mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-24 10:30:38 +00:00
For sstable reads, bigger buffers are not always better, because it can be the case that we want to read just a piece of data. However, as it so happens, we have already two variants for read: when we want to read a single key, we will use read_row(), which will try to bring all data in: so it will use smaller buffer. For read_rows(), that will naturally span multiple buffers, we have end and start points: with that, we can have a good estimation of the expected buffer size, and we can have it go up until we reaches the 128k limit we have for writes. Before: 209578.62 +- 135.73 partitions / sec (30 runs, 1 concurrent ops) After: 291703.98 +- 218.95 partitions / sec (30 runs, 1 concurrent ops) Gain: 39.19 % Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>