Task #906853: Implement ThreadLocalServiceData and reduce lock contentions during...
authorLee Hwa <leehwa@fb.com>
Mon, 6 Aug 2012 20:42:49 +0000 (13:42 -0700)
committerTudor Bosman <tudorb@fb.com>
Sun, 26 Aug 2012 18:13:36 +0000 (11:13 -0700)
commit43c97295fe42ad21941fa94637c2e783733d6d63
tree01a3e732879149813658fef9003f457ce3562221
parent68a546c7cdd7df99b436a0d26c2ef7bb766fe435
Task #906853: Implement ThreadLocalServiceData and reduce lock contentions during channel counter update

Summary:
Cache the counter updates on thread local data structures and aggregate/publish
the data from a separate thread periodically. The ThreadLocalServiceData is
implemented on top of the TLStats data structures.

I am plannig to deploy a private build to production tomorrow to test this
change in production, but figured it might be better to send the diff out first
and get code review feedbacks at the same time.

Test Plan: Run and pass unit tests. Run end-to-end testings on sandbox. (TBD)
Deploy a private build to a production server and make sure the thrift call
latency is reduced.

Reviewed By: xin@fb.com

FB internal diff: D540239
folly/Histogram.h