basho / riak_kv

Riak Key/Value Store
Apache License 2.0
652 stars 232 forks source link

Optimization opportunities for riak_object.erl [JIRA: RIAK-1745] #1060

Open slfritchie opened 9 years ago

slfritchie commented 9 years ago

It's quite likely that riak_object:from_binary/3 could use some intense scrutiny. According to the flamegraphs I've made, using a method of sending sequential KV get ops directly to a single vnode, that function is almost 50% of wall-clock time. (Both flamegraphs use fairly-high-overhead Erlang tracing of all function calls & returns by the vnode proc under test.)

http://www.snookles.com/scottmp/foo.eflame2.57-bitcask.svg http://www.snookles.com/scottmp/foo.eflame.58-bitcask.svg

According to a less intrusive measurement (also using Erlang tracing but only tracing the top-level function only and nothing deeper in the call stack), the wall-clock time is about 30%.

30% or 50%, this is a good candidate for optimization.

See also: https://github.com/basho/riak_kv/issues/1052

slfritchie commented 9 years ago

Derp, sorry, the Riak version measured here was 1.4.10.

DSomogyi commented 9 years ago

Comment for Jira.