You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Test alt cache for performance regressions before releasing #1875
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.
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.
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).
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).
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
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.
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.)
@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?
@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...
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.
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)
Activity
danielmewes commentedon Feb 18, 2014
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
Hard Durability (SSD), Warm Cache, 10 Clients
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.
danielmewes commentedon Feb 18, 2014
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).
danielmewes commentedon Feb 20, 2014
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).
danielmewes commentedon Mar 21, 2014
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 waydanielmewes commentedon Mar 21, 2014
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.
mlucy commentedon Mar 21, 2014
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.)
danielmewes commentedon Mar 21, 2014
@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?
danielmewes commentedon Mar 22, 2014
@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()inflush_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...danielmewes commentedon Mar 22, 2014
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.
danielmewes commentedon Mar 22, 2014
Here's another one: Check that read-ahead actually works.
danielmewes commentedon Mar 22, 2014
Read ahead has been fixed with #2143 and is now working.
danielmewes commentedon Mar 22, 2014
Memory consumption for large tables should decrease dramatically with #2137 and I'm going to do one final test in that branch now.
danielmewes commentedon Mar 22, 2014
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)
Once #2137 is merged, things look pretty good.
danielmewes commentedon Mar 22, 2014
Closing, all things I wanted to test are tested.
neumino commentedon Mar 22, 2014
Woot woot!
coffeemug commentedon Mar 22, 2014
@danielmewes -- you're a magician!
danielmewes commentedon Mar 22, 2014
@srh and @Tryneus are the magicians here 👍