On 8/22/19 7:56 AM, Alex Shi wrote:because they mixes pages from different cgroups.
å 2019/8/22 äå2:00, Daniel Jordan åé:
It's also synthetic but it stresses lru_lock more than just anon alloc/free.Â It hits the page activate path, which is where we see this lock in our database, and if enough memory is configured lru_lock also gets stressed during reclaim, similar to .
Thanks for the sharing, this patchset can not help the  case, since it's just relief the per container lock contention now.
I should've been clearer.Â  is meant as an example of someone suffering from lru_lock during reclaim.Â Wouldn't your series help per-memcg reclaim?
Yes, readtwice case could be more sensitive for this lru_lock changes in containers. I may try to use it in container with some tuning. But anyway, aim9 is also pretty good to show the problem and solutions. :)
It'd be better though, as Michal suggests, to use the real workload that's causing problems.Â Where are you seeing contention?
We repeatly create or delete a lot of different containers according to servers load/usage, so normal workload could cause lots of pages alloc/remove.
I think numbers from that scenario would help your case.
aim9 could reflect part of scenarios. I don't know the DB scenario yet.
We see it during DB shutdown when each DB process frees its memory (zap_pte_range -> mark_page_accessed).Â But that's a different thing, clearly Not This Series.
After splitting lru-locks present per-cpu page-vectors works no so wellWith this patch series, lruvec->lru_lock show no contentions
ÂÂÂÂÂÂÂÂÂ &(&lruvec->lru_l...ÂÂÂÂÂÂÂÂÂ 8ÂÂÂÂÂÂÂÂÂ 0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 0ÂÂÂÂÂÂ 0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 0
and aim9 page_test/brk_test performance increased 5%~50%.
Where does the 50% number come in?Â The numbers below seem to only show ~4% boost.
the Setddev/CoeffVar case has about 50% performance increase. one of container's mmtests result as following:
StddevÂÂÂ page_testÂÂÂÂÂ 245.15 (ÂÂ 0.00%)ÂÂÂÂÂ 189.29 (Â 22.79%)
StddevÂÂÂ brk_testÂÂÂÂÂ 1258.60 (ÂÂ 0.00%)ÂÂÂÂÂ 629.16 (Â 50.01%)
CoeffVarÂ page_testÂÂÂÂÂÂÂ 0.71 (ÂÂ 0.00%)ÂÂÂÂÂÂÂ 0.53 (Â 26.05%)
CoeffVarÂ brk_testÂÂÂÂÂÂÂÂ 1.32 (ÂÂ 0.00%)ÂÂÂÂÂÂÂ 0.64 (Â 51.14%)
Aha.Â 50% decrease in stdev.