Re: [PATCH 00/14] per memcg lru_lock

From: Alex Shi
Date: Thu Aug 22 2019 - 09:45:50 EST




å 2019/8/22 äå2:00, Daniel Jordan åé:
>>
>
> This is system-wide right, not per container? Even per container, 89 usec isn't much contention over 20 seconds. You may want to give this a try:

yes, perf lock show the host info.
>
> Â https://git.kernel.org/pub/scm/linux/kernel/git/wfg/vm-scalability.git/tree/case-lru-file-readtwice>
> 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 [1].

Thanks for the sharing, this patchset can not help the [1] case, since it's just relief the per container lock contention now. 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. aim9 could reflect part of scenarios. I don't know the DB scenario yet.

>
>> With 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%)