Investigate jitter coordination

This commit is contained in:
martinsumner 2016-12-08 18:30:45 +00:00
parent c40e5d2d30
commit ac45f95559

View file

@ -231,7 +231,7 @@ init([Opts]) ->
{InkerOpts, PencillerOpts} = set_options(Opts),
{Inker, Penciller} = startup(InkerOpts, PencillerOpts),
CacheSize = get_opt(cache_size, Opts, ?CACHE_SIZE)
+ random:uniform(?CACHE_SIZE_JITTER),
+ erlang:phash2(self()) band ?CACHE_SIZE_JITTER,
leveled_log:log("B0001", [Inker, Penciller]),
{ok, #state{inker=Inker,
penciller=Penciller,