Linux cgroups development
 help / color / mirror / Atom feed
From: Ivan Zahariev <famzah@icdsoft.com>
To: Tejun Heo <tj@kernel.org>
Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Cgroups "pids" controller does not update "pids.current" count immediately
Date: Fri, 15 Jun 2018 22:38:04 +0300	[thread overview]
Message-ID: <d2c7a301-1d89-7019-8fca-3f34c853ce1a@icdsoft.com> (raw)
In-Reply-To: <20180615190724.GX1351649@devbig577.frc2.facebook.com>

Hello,


On 15.6.2018 г. 22:07 ч., Tejun Heo wrote:
> On Fri, Jun 15, 2018 at 08:40:02PM +0300, Ivan Zahariev wrote:
>> The lazy pids accounting + modern fast CPUs makes the "pids.current"
>> metric practically unusable for resource limiting in our case. For a
>> test, when we started and ended one single process very quickly, we
>> saw "pids.current" equal up to 185 (while the correct value at all
>> time is either 0 or 1). If we want that a "cgroup" can spawn maximum
>> 50 processes, we should use some high value like 300 for "pids.max",
>> in order to compensate the pids uncharge lag (and this depends on
>> the speed of the CPU and how busy the system is).
> Yeah, that actually makes a lot of sense.  We can't keep everything
> synchronous for obvious performance reasons but we definitely can wait
> for RCU grace period before failing.  Forking might become a bit
> slower while pids are draining but shouldn't fail and that shouldn't
> incur any performance overhead in normal conditions when pids aren't
> constrained.

I lack expertise to comment on this. As a system administrator, I can 
only remind that nowadays machines with 80+ CPU cores are something 
usual. I don't know how the RCU grace period scales with an increasing 
number of CPUs.

If you develop a patch for this, we can try it in production and give 
you feedback. Just send me an email notification.

Thank you for your time and attention!

--
Ivan

      reply	other threads:[~2018-06-15 19:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <77af3805-e912-2664-f347-e30c0919d0c4@icdsoft.com>
2018-06-14 17:26 ` Cgroups "pids" controller does not update "pids.current" count immediately Aleksa Sarai
2018-06-14 17:27   ` Aleksa Sarai
     [not found] ` <20180614150650.GU1351649@devbig577.frc2.facebook.com>
2018-06-15 14:26   ` Ivan Zahariev
2018-06-15 15:41     ` Tejun Heo
2018-06-15 16:07       ` Ivan Zahariev
2018-06-15 16:16         ` Tejun Heo
2018-06-15 17:40           ` Ivan Zahariev
2018-06-15 19:07             ` Tejun Heo
2018-06-15 19:38               ` Ivan Zahariev [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d2c7a301-1d89-7019-8fca-3f34c853ce1a@icdsoft.com \
    --to=famzah@icdsoft.com \
    --cc=cgroups@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox