Details
-
Bug
-
Resolution: Fixed
-
Major
-
5.5.0
-
Untriaged
-
No
-
CBSS Sprint OCT-13-2017, CBSS Sprint OCT-27-2017
Description
As part of eviction, the first step is to determine if the current MemoryInUse is greater than a threshold. However the call to compute the MemoryInUse() walks through all the plasma writer contexts to sum up the stats. This is ok when there are a small number of writers instances. However if the number of writer instances is large and we enter memory pressure often, then this very task of computing the MemoryInUse() ends up being too expensive and hogging up CPU eventually slowing down eviction.
One solution might just be to use a global atomic to have each writer update its memory in use so that there is no need for looping over other writer contexts to obtain the usage.