Details
-
Bug
-
Resolution: Fixed
-
Major
-
4.0.0
-
Security Level: Public
-
For extreme CPU burning, requires a patch to remove the 10 bucket limit.
However 10 buckets and CPU is a little hungry.
-
Triaged
-
No
Description
Issue found when running with 60 buckets and profiling all CPU intensive processes.
fprof showed the per bucket couchdb_stats_reader code was spending a lot of time doing "dir_size:get", and with > 10 buckets this cost grows into a very CPU hungry beam. Note 10 buckets and things aren't too bad.
Some analysis showed we were going down the dir_size:get_slow path because the dir_size module was not running in the couchdb beam process.
53 get(Dir) ->
54 case erlang:whereis(?MODULE) of <--- returning undefined
55 undefined ->
56 get_slow(Dir); <- yes this is SLOW!
57 _Pid ->
58 gen_server:call(?MODULE,
, infinity)
59 end.