Handle gen_server:cast slowness

There was some unpredictable performance in tests, that was related to
the amount of time it took the sft gen_server to accept a cast whihc
passed the levelzero_cache.

The response time looked to be broadly proportional to the size of the
cache - so it appeared to be an issue with passing the large object to
the process queue.

To avoid this, the penciller now instructs the SFT gen_server to
callback to the server for each tree in the cache in turn as it is
building the list from the cache.  Each of these requests should be
reltaively short, and the processing in-between should space out the
requests so the Pencille ris not blocked from answering queries when
pompting a L0 write.
This commit is contained in:
martinsumner 2016-10-31 01:33:33 +00:00
parent 311179964a
commit 4cffecf2ca
6 changed files with 73 additions and 32 deletions

View file

@ -66,6 +66,7 @@
{root_path :: string(),
cache_size :: integer(),
max_journalsize :: integer(),
max_pencillercachesize :: integer(),
snapshot_bookie :: pid(),
reload_strategy = [] :: list(),
max_run_length :: integer()}).