lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1307182231.25172.34.camel@marge.simson.net>
Date:	Sat, 04 Jun 2011 12:10:31 +0200
From:	Mike Galbraith <efault@....de>
To:	Martin Baum <pop3@...chtaucher.de>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: cgroups: Assigning tasks to a cgroup slow and does not scale

On Sat, 2011-06-04 at 10:23 +0200, Martin Baum wrote:
> Hello,
> 
> assigning a task to new cgroup takes an unexpected high amount of time  
> on my system - about 0.05s. Strangely it does it does not scale with  
> more processes: When I run 10 processes that do nothing but change  
> their cgroups each cgroup change takes about 0.5 seconds while CPU  
> usage remains very low. So my system maxes out at 20 cgroup changes  
> per second while cpu and disk usage remain minimal (according to top).  
> Is this expected behaviour?

Attaching a task invokes synchronize_rcu() along the way, so yup, it's
the expected behavior.

> It is a problem for me: I run a daemon that forks and calls suid for  
> each request. I want to assign each of these forks to a different  
> cgroup. However this currently kills performance going down from >100  
> req/sec to about 20 req/sec.

You can work around it via static cgroups with an agent waiting inside
each one.  Tell your agent what to do, he forks off a worker.  You can
inherit a cgroup quickly, but moving between cgroups is very expensive,
as you noticed.

(right way is eventually stop exporting rcu grace periods to userland)

	-Mike

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ