From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Subject: Re: [RFC PATCH 0/2] support cgroup pool in v1 Date: Wed, 8 Sep 2021 14:37:23 +0200 Message-ID: References: Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631104646; bh=nMezGjgjwzg9bIdKI/lKo1CwMtPF/hzsmq+sSzvk1iM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RB7SYU+aQABbNPtw/eKMtzShODOIWXCRyxgwmRtzQu1yJ3v4YBMq86oggOT7NO72X ieyEByBTieCISCNeqDdxmmYVNKXkdo46Hgwznf3J6v1cAu7dUyNEbOF+/Gwf8a4Y3E FC9qRh1cgCSNQVV++u8F7zHv3VQcFUlZXJttaIPY= Content-Disposition: inline In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Yi Tao Cc: tj@kernel.org, lizefan.x@bytedance.com, hannes@cmpxchg.org, mcgrof@kernel.org, keescook@chromium.org, yzaikin@google.com, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-fsdevel@vger.kernel.org, shanpeic@linux.alibaba.com On Wed, Sep 08, 2021 at 08:15:11PM +0800, Yi Tao wrote: > In a scenario where containers are started with high concurrency, in > order to control the use of system resources by the container, it is > necessary to create a corresponding cgroup for each container and > attach the process. The kernel uses the cgroup_mutex global lock to > protect the consistency of the data, which results in a higher > long-tail delay for cgroup-related operations during concurrent startup. > For example, long-tail delay of creating cgroup under each subsystems > is 900ms when starting 400 containers, which becomes bottleneck of > performance. The delay is mainly composed of two parts, namely the > time of the critical section protected by cgroup_mutex and the > scheduling time of sleep. The scheduling time will increase with > the increase of the cpu overhead. Perhaps you shouldn't be creating that many containers all at once? What normal workload requires this? thanks, greg k-h