stardog-union / rocksdb

GNU General Public License v2.0
4 stars 1 forks source link

block timing routines that slow performance and cannot be disabled vi… #21

Closed matthewvon closed 3 years ago

matthewvon commented 3 years ago

This PR has two changes relating to statistics (the second being the most significant):

  1. we use rocksdb 5.18 currently. The latest release from Facebook allows users to selectively deactivate histograms while supporting other statistics. 5.18 does not. Manually disabled the histogram code, but left it with "#if 0" block to help remember to do right thing once we upgrade our version.

  2. The StopwatchNano object is currently used only within merge_helper.cc. It is mostly, but not entirely, deactivated when user does not supply a statistics object. The "not entirely" implies it is getting called once for every key passed to our ternary compaction filter. The call to clock_gettime() within StopwatchNano is a significant overhead. Completely killing it for now.

I will put together a patch to Facebook's rocksdb to properly fix merge_helper.cc. That way the hack in #2 will go away naturally when we upgrade. Hack #1 is going to require disabling the histograms when we create the statistics object within rocksconfig.cpp once we upgrade rocksdb.

Fix number 2 is known to increase "optimize" throughput per Jenkins starbench.

graetzer commented 3 years ago

Looks good in principle, although I think ElapsedNanos should probably just return 0