Skip to content

Test alt cache for performance regressions before releasing #1875

Closed

Description

@danielmewes

Before releasing 1.12 with the new cache (#1642), we should at least make some basic performance tests.
We can do most of it automatically thanks to #1806, but should probably look into a few aspects more deeply (e.g. performance when having concurrent clients).

I've noticed for example that soft, batched inserts are sometimes slower with its current implementation than with the old cache.

Activity

  1. danielmewes commented on Feb 18, 2014

    @danielmewes
    MemberAuthor

    Here is a comparison of YCSB performance data between v1.11.x, next and sam_alt.
    Weirdly, the hard durability numbers are worse for all versions even in the read-only workload. Something with this test is not quite right. Have to investigate that later.

    Soft Durability, Warm Cache, 10 Clients

    YCSB Workload v1.11.x ops/s next ops/s sam_alt ops/s
    a (50/50 read/update) 7382 8006 719
    b (95/5 read/update) 14584 15767 7337
    c (100 read) 17909 18449 17373
    d (95/5 read/insert) 15642 16478 15495
    e (95/5 scan/insert) 517 1215 1283
    f (50/50 read/readmodifywrite) 5825 6577 678

    Hard Durability (SSD), Warm Cache, 10 Clients

    YCSB Workload v1.11.x ops/s next ops/s sam_alt ops/s
    a (50/50 read/update) 764 711 580
    b (95/5 read/update) 6111 6084 5296
    c (100 read) 5710 5827 5686
    d (95/5 read/insert) 5908 5591 5173
    e (95/5 scan/insert) 547 1250 1307
    f (50/50 read/readmodifywrite) 747 696 568

    The alt cache has huge regressions with write workloads, especially in soft durability. The reasons for that are probably that it a) doesn't support blocks smaller than 4 KB yet (so it writes more data than necessary), and more importantly b) doesn't merge flushes from different transactions yet.
    I think @srh is working on these things.

  2. danielmewes commented on Feb 18, 2014

    @danielmewes
    MemberAuthor

    Secondary index creation under reads (#1556) is still fine. There is a ~1-second drop in the QPS both when the index is created and when it is dropped. During post-construction itself the QPS are unaffected. Not sure if we had this in the old cache. It generally doesn't look critical though. (Edit: We didn't have the QPS drop when dropping an sindex. That's something worth investigating later).

  3. danielmewes commented on Feb 20, 2014

    @danielmewes
    MemberAuthor

    Backfill performance and other write workloads are currently a lot slower (e.g. 1K writes/s instead of 13K). Have to retest when the remaining optimizations are implemented (especially flush multiple txns in parallel, < 4 K blocks).

  4. danielmewes commented on Mar 21, 2014

    @danielmewes
    MemberAuthor

    This is the list of things I would like to test before releasing:
    - Quick YCSB test on rotational drives (small data set)
    - Backfill/sindex creation latency impact compared to 1.11.x (#2071)
    - Memory consumption when working with large databases
    - Verify that #1885 is fixed, testing general backfilling performance on the way

  5. danielmewes commented on Mar 21, 2014

    @danielmewes
    MemberAuthor

    On rotational drives, a mixed read/write workload (50/50 reads/writes, YCSB workload "a") with hard durability is faster in next (140 qps next vs. 115 qps 1.11).
    In soft durability next is a lot slower (750 qps vs. 7700 qps for 1.11). That's because the unsaved data limit of 1.11 was never hit in this test though, so it just absorbed all of the writes into RAM.

    Seems ok.

  6. mlucy commented on Mar 21, 2014

    @mlucy
    Member

    I don't quite follow the second point. We have 10x lower throughput for soft durability ops because we're throttling more aggressively? Why do we want the current level of throttling rather than the level in 1.11? (I'm worried about people running simple benchmarks and thinking we messed something up.)

  7. danielmewes commented on Mar 21, 2014

    @danielmewes
    MemberAuthor

    @mlucy: Both behaviors have advantages and disadvantages. The thing is that if we don't throttle early, benchmarks like this one will not measure the performance that can actually be sustained over longer times. On the other hand there can be actual real-world scenarios where allowing for a higher rate of writes over short periods is desired. We've also had latency issues resulting from too large unwritten data sets in the past, because some operations that had to be atomic became slow.
    I personally don't have a very strong preference for one or the other behavior.
    @coffeemug Any insights from talking to clients about this?

  8. danielmewes commented on Mar 22, 2014

    @danielmewes
    MemberAuthor

    @coffeemug suggests that we slightly increase the unflushed data limit to approximately 128 MB per table. That sounds reasonable.
    The only thing we have to change to make that possible is to avoid the coro_t::spawn_sometime() in flush_and_destroy_txn_waiter_t::run(). Otherwise those calls would allocate a lot of memory for coroutine stacks. A coro pool would work well for this I think...

  9. danielmewes commented on Mar 22, 2014

    @danielmewes
    MemberAuthor

    Backfilling on rotational drives is a little slower in certain scenarios (probably a conseqeuence of #2071 fixes), but has a much more reliable speed and doesn't suffer from #1855.
    On SSDs it seems to be faster than in 1.11.

  10. danielmewes commented on Mar 22, 2014

    @danielmewes
    MemberAuthor

    Here's another one: Check that read-ahead actually works.

  11. danielmewes commented on Mar 22, 2014

    @danielmewes
    MemberAuthor

    Read ahead has been fixed with #2143 and is now working.

  12. danielmewes commented on Mar 22, 2014

    @danielmewes
    MemberAuthor

    Memory consumption for large tables should decrease dramatically with #2137 and I'm going to do one final test in that branch now.

  13. danielmewes commented on Mar 22, 2014

    @danielmewes
    MemberAuthor

    A little experiment regarding memory consumption:
    Inserting 1 (2) million documents of slightly less than 4 KB
    Cache size 512 MB (either set on table creation, or at startup)

    Branch Memory usage @ 1M docs Memory usage @ 2M docs
    sam_2137 #2137 695 MB 778 MB
    next 911 MB not tested
    v1.11.x 743 MB 846 MB

    Once #2137 is merged, things look pretty good.

  14. danielmewes commented on Mar 22, 2014

    @danielmewes
    MemberAuthor

    Closing, all things I wanted to test are tested.

  15. neumino commented on Mar 22, 2014

    @neumino
    Member

    Woot woot!

  16. coffeemug commented on Mar 22, 2014

    @coffeemug
    Contributor

    @danielmewes -- you're a magician!

  17. danielmewes commented on Mar 22, 2014

    @danielmewes
    MemberAuthor

    @srh and @Tryneus are the magicians here 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions