basho/riak_kv — pull request #449 by russelldb (2012-12-13 16:55:15+00:00)
Title: Update stats in process

When a node is giving good thoughput then riak_kv_stat cannot keep
up. Large message queues ensue, memory balloons, the node dies.
This commit only forces stat creation through the gen_server, any
other stat update is direct in process.

This does cause a degradation in throughput & latency as each get / put
process is waiting to acquire the locks on the folsom tables.

NOTE: this works a whole lot better with these `folsom` optimisations https://github.com/basho/folsom/tree/adt-faster-spiral

With the `folsom` improvements, put throughput is as good as 1.2.1 (though worse than master without stats.) Even with the `folsom` improvements, there is extra latency, most noticeable in the 95th%ile.