Negative performances impact from 1.19 to 1.22
- Dominant language
- C++
- Stars
- 39.4k
- Forks
- 8.2k
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
We are heavily using LevelDB in one or our product, and when we switched from 1.19 to 1.22 recently, we saw that our product is 7-10% slower with 1.22.
If we compare `db_bunch` result, we see this :
```
LevelDB: version 1.19
Keys: 16 bytes each
Values: 100 bytes each (50 bytes after compression)
Entries: 1000000
RawSize: 110.6 MB (estimated)
FileSize: 62.9 MB (estimated)
------------------------------------------------
fillseq : 4.384 micros/op; 25.2 MB/s
fillsync : 51.383 micros/op; 2.2 MB/s (1000 ops)
fillrandom : 6.353 micros/op; 17.4 MB/s
overwrite : 7.314 micros/op; 15.1 MB/s
readrandom : 9.048 micros/op; (1000000 of 1000000 found)
readrandom : 7.684 micros/op; (1000000 of 1000000 found)
readseq : 0.301 micros/op; 368.0 MB/s
readreverse : 0.395 micros/op; 280.0 MB/s
compact : 1071433.000 micros/op;
readrandom : 6.266 micros/op; (1000000 of 1000000 found)
readseq : 0.276 micros/op; 401.2 MB/s
readreverse : 0.334 micros/op; 331.3 MB/s
fill100K : 1656.795 micros/op; 57.6 MB/s (1000 ops)
crc32c : 3.073 micros/op; 1271.0 MB/s (4K per op)
snappycomp : 24.433 micros/op; 159.9 MB/s (output: 55.1%)
snappyuncomp : 2.470 micros/op; 1581.6 MB/s
acquireload : 11.447 micros/op; (each op is 1000 loads)
```
```
LevelDB: version 1.22
Keys: 16 bytes each
Values: 100 bytes each (50 bytes after compression)
Entries: 1000000
RawSize: 110.6 MB (estimated)
FileSize: 62.9 MB (estimated)
------------------------------------------------
fillseq : 4.461 micros/op; 24.8 MB/s
fillsync : 6595.226 micros/op; 0.0 MB/s (1000 ops)
fillrandom : 6.949 micros/op; 15.9 MB/s
overwrite : 10.130 micros/op; 10.9 MB/s
readrandom : 8.512 micros/op; (1000000 of 1000000 found)
readrandom : 7.239 micros/op; (1000000 of 1000000 found)
readseq : 0.305 micros/op; 363.2 MB/s
readreverse : 0.389 micros/op; 284.5 MB/s
compact : 1327342.000 micros/op;
readrandom : 6.123 micros/op; (1000000 of 1000000 found)
readseq : 0.275 micros/op; 401.8 MB/s
readreverse : 0.343 micros/op; 322.7 MB/s
fill100K : 2125.197 micros/op; 44.9 MB/s (1000 ops)
crc32c : 1.681 micros/op; 2323.5 MB/s (4K per op)
snappycomp : 24.751 micros/op; 157.8 MB/s (output: 55.1%)
snappyuncomp : 2.463 micros/op; 1586.2 MB/s
```
- LevelDB 1.19 was compiled "as it" (it use -O2 & NDEBUG) and it include snappy.
- LevelDB 1.22 was compiled in release mode (it also use -O2 & NDEBUG), and include libcrc32c + snappy.
All are compiled and tested with Xcode 10.3 (`Apple LLVM version 10.0.1 (clang-1001.0.46.4)`) on macOS 10.14.6 on a MacBook Pro (3,1 GHz Intel Core i7) with 16 GB RAM and 1 TB SSD.
If results are most of the time similar, we see a huge difference in `fillsync` (we are not using sync mode, so shouldn't impact us, but I'm wondering anyway), `overwrite` and `fill100K` (I exclude crc32, as it have better result in 1.22, probably because of libcrc32c).
Is it an known problem (I didn't find any other tickets) ? Is it something only happening on our side ?
Thank you.
Contributor guide
Assessment
This issue has not been assessed yet.