Linux cgroups development
 help / color / mirror / Atom feed
From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: brookxu <brookxu.cn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org,
	lizefan.x-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org,
	hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [RFC PATCH v2 1/3] misc_cgroup: add support for nofile limit
Date: Tue, 27 Jul 2021 06:32:15 -1000	[thread overview]
Message-ID: <YQA1D1GRiF9+px/s@mtj.duckdns.org> (raw)
In-Reply-To: <b2ff6f80-8ec6-e260-ec42-2113e8ce0a18-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Hello,

On Tue, Jul 27, 2021 at 11:18:00AM +0800, brookxu wrote:
> According to files_maxfiles_init(), we only allow about 10% of free memory to
> create filps, and each filp occupies about 1K of cache. In this way, on a 16G
> memory machine, the maximum usable filp is about 1,604,644. In general
> scenarios, this may not be a big problem, but if the task is abnormal, it will
> very likely become a bottleneck and affect other modules. 

Yeah but that can be configured trivially through sysfs. The reason why the
default limit is lowered is because we wanna prevent a part of system to
consume all the memory through fds. With cgroups, we already have that
protection and at least some systems already configure file-max to maximum,
so I don't see a point in adding another interface to subdivide the
artificial limit.

Thanks.

-- 
tejun

  parent reply	other threads:[~2021-07-27 16:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-22 15:20 [RFC PATCH v2 1/3] misc_cgroup: add support for nofile limit brookxu
2021-07-22 15:20 ` [RFC PATCH v2 2/3] misc_cgroup: add failcnt counter brookxu
     [not found] ` <3fd94563b4949ffbfe10e7d18ac1df3852b103a6.1626966339.git.brookxu-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org>
2021-07-22 15:20   ` [RFC PATCH v2 3/3] misc_cgroup: delete failed logs to avoid log flooding brookxu
2021-07-26 21:27 ` [RFC PATCH v2 1/3] misc_cgroup: add support for nofile limit Tejun Heo
     [not found]   ` <YP8ovYqISzKC43mt-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2021-07-27  3:18     ` brookxu
     [not found]       ` <b2ff6f80-8ec6-e260-ec42-2113e8ce0a18-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2021-07-27 16:32         ` Tejun Heo [this message]
2021-07-28  3:17           ` brookxu
2021-07-28  7:41             ` Tejun Heo
     [not found]               ` <YQEKNPrrOuyxTarN-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2021-07-28  9:47                 ` brookxu
2021-07-28 15:38                   ` Tejun Heo
     [not found]                     ` <YQF5/8Zb/iY5DS7f-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2021-07-29  6:37                       ` brookxu

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=YQA1D1GRiF9+px/s@mtj.duckdns.org \
    --to=tj-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=brookxu.cn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
    --cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lizefan.x-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org \
    --cc=viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.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