rocksdb/java
Baptiste Lemaire e817bc9628 Added memtable garbage statistics (#8411)
Summary:
**Summary**:
2 new statistics counters are added to RocksDB: `MEMTABLE_PAYLOAD_BYTES_AT_FLUSH` and `MEMTABLE_GARBAGE_BYTES_AT_FLUSH`. The former tracks how many raw bytes of useful data are present on the memtable at flush time, whereas the latter is tracks how many of these raw bytes are considered garbage, meaning that they ended up not being imported on the SSTables resulting from the flush operations.

**Unit test**: run `make db_flush_test -j$(nproc); ./db_flush_test` to run the unit test.
This executable includes 3 tests, that test support and correct stat calculations for workloads with inserts, deletes, and DeleteRanges. The parameters are set such that the workloads are performed on a single memtable, and a single SSTable is created as a result of the flush operation. The flush operation is manually called in the test file. The tests verify that the values of these 2 statistics counters introduced in this PR  can be exactly predicted, showing that we have a full understanding of the underlying operations.

**Performance testing**:
`./db_bench -statistics -benchmarks=fillrandom -num=10000000` repeated 10 times.
Timing done using "date" function in a bash script.
_Results_:
Original Rocksdb fork: mean 66.6 sec, std 1.18 sec.
This feature branch: mean 67.4 sec, std 1.35 sec.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/8411

Reviewed By: akankshamahajan15

Differential Revision: D29150629

Pulled By: bjlemaire

fbshipit-source-id: 7b3c2e86d50c6aa34fa50fd134282eacb543a5b1
2021-06-18 04:57:27 -07:00
..
benchmark/src/main/java/org/rocksdb/benchmark Apply formatter on recent 45 commits. (#5827) 2019-09-19 12:34:17 -07:00
crossbuild Automatically number the Maven artifacts (#7219) 2020-08-06 14:13:30 -07:00
jmh Improve RocksJava Comparator (#6252) 2020-02-03 12:30:13 -08:00
rocksjni Added memtable garbage statistics (#8411) 2021-06-18 04:57:27 -07:00
samples/src/main/java fix java sample typo and replace deprecated code with latest (#7906) 2021-02-01 14:45:34 -08:00
src Added memtable garbage statistics (#8411) 2021-06-18 04:57:27 -07:00
CMakeLists.txt support getUsage and getPinnedUsage in JavaAPI for Cache (#7925) 2021-03-17 09:30:33 -07:00
HISTORY-JAVA.md Update JAVA-HISTORY.md for v3.13 2015-08-04 18:12:58 -07:00
jdb_bench.sh Add copyright headers per FB open-source checkup tool. (#5199) 2019-04-18 10:55:01 -07:00
Makefile support getUsage and getPinnedUsage in JavaAPI for Cache (#7925) 2021-03-17 09:30:33 -07:00
pom.xml.template Update the versions of the test dependencies used for RocksJava (#7805) 2021-01-13 16:01:38 -08:00
RELEASE.md Add shared library for musl-libc (#3143) 2019-11-26 18:24:09 -08:00