rocksdb/port
Lei Jin 5ef1ba7ff5 generic rate limiter
Summary:
A generic rate limiter that can be shared by threads and rocksdb
instances. Will use this to smooth out write traffic generated by
compaction and flush. This will help us get better p99 behavior on flash
storage.

Test Plan:
unit test output
==== Test RateLimiterTest.Rate
request size [1 - 1023], limit 10 KB/sec, actual rate: 10.374969 KB/sec, elapsed 2002265
request size [1 - 2047], limit 20 KB/sec, actual rate: 20.771242 KB/sec, elapsed 2002139
request size [1 - 4095], limit 40 KB/sec, actual rate: 41.285299 KB/sec, elapsed 2202424
request size [1 - 8191], limit 80 KB/sec, actual rate: 81.371605 KB/sec, elapsed 2402558
request size [1 - 16383], limit 160 KB/sec, actual rate: 162.541268 KB/sec, elapsed 3303500

Reviewers: yhchiang, igor, sdong

Reviewed By: sdong

Subscribers: leveldb

Differential Revision: https://reviews.facebook.net/D19359
2014-07-08 11:41:57 -07:00
..
win reverting disastrous MOE commit, returning to r21 2011-04-19 23:11:15 +00:00
atomic_pointer.h Move the compiler back to 4.8.1 + more small fixes 2013-11-18 11:40:16 -08:00
likely.h cache SuperVersion in thread local storage to avoid mutex lock 2014-02-27 11:38:55 -08:00
port_example.h db_bench cleanup 2014-04-08 11:21:09 -07:00
port_posix.cc generic rate limiter 2014-07-08 11:41:57 -07:00
port_posix.h Add TimedWait() API to CondVar. 2014-07-03 10:22:08 -07:00
port.h Move the compiler back to 4.8.1 + more small fixes 2013-11-18 11:40:16 -08:00
README reverting disastrous MOE commit, returning to r21 2011-04-19 23:11:15 +00:00
stack_trace.cc Better stack trace in MAC 2014-04-25 09:50:51 -04:00
stack_trace.h Print out stack trace in mac, too 2014-04-23 09:11:35 -04:00

This directory contains interfaces and implementations that isolate the
rest of the package from platform details.

Code in the rest of the package includes "port.h" from this directory.
"port.h" in turn includes a platform specific "port_<platform>.h" file
that provides the platform specific implementation.

See port_posix.h for an example of what must be provided in a platform
specific header file.