Add log of higher than expected ratio of cache sizes
Warn at startup if this ratio is high. Not sure how snapshots will perform if there are a lot of ledger cache sin the list. However, it should still work. basic_SUITE/load_count test intended to demonstrate that a large ratio is still functional
This commit is contained in:
parent
c060c0e41d
commit
a4d89ad6d1
2 changed files with 17 additions and 0 deletions
|
@ -1125,6 +1125,20 @@ init([Opts]) ->
|
|||
ConfiguredCacheSize div (100 div ?CACHE_SIZE_JITTER),
|
||||
CacheSize =
|
||||
ConfiguredCacheSize + erlang:phash2(self()) rem CacheJitter,
|
||||
PCLMaxSize =
|
||||
PencillerOpts#penciller_options.max_inmemory_tablesize,
|
||||
CacheRatio = PCLMaxSize div ConfiguredCacheSize,
|
||||
% It is expected that the maximum size of the penciller
|
||||
% in-memory store should not be more than about 10 x the size
|
||||
% of the ledger cache. In this case there will be a larger
|
||||
% than tested list of ledger_caches in the penciller memory,
|
||||
% and performance may be unpredictable
|
||||
case CacheRatio > 32 of
|
||||
true ->
|
||||
leveled_log:log("B0020", [PCLMaxSize, ConfiguredCacheSize]);
|
||||
false ->
|
||||
ok
|
||||
end,
|
||||
|
||||
{HeadOnly, HeadLookup} =
|
||||
case proplists:get_value(head_only, Opts) of
|
||||
|
|
|
@ -75,6 +75,9 @@
|
|||
{"B0019",
|
||||
{warn, "Use of book_indexfold with constraint of Bucket ~w with "
|
||||
++ "no StartKey is deprecated"}},
|
||||
{"B0020",
|
||||
{warn, "Ratio of penciller cache size ~w to bookie's memory "
|
||||
++ "cache size ~w is larger than expected"}},
|
||||
|
||||
{"R0001",
|
||||
{debug, "Object fold to process batch of ~w objects"}},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue