From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-f70.google.com (mail-ot1-f70.google.com [209.85.210.70]) by kanga.kvack.org (Postfix) with ESMTP id 69BA78E0001 for ; Mon, 17 Dec 2018 03:55:04 -0500 (EST) Received: by mail-ot1-f70.google.com with SMTP id g4so7142609otl.14 for ; Mon, 17 Dec 2018 00:55:04 -0800 (PST) Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id d132sor6784751oia.8.2018.12.17.00.55.03 for (Google Transport Security); Mon, 17 Dec 2018 00:55:03 -0800 (PST) MIME-Version: 1.0 References: <20181217084836.GA22890@rapoport-lnx> In-Reply-To: <20181217084836.GA22890@rapoport-lnx> From: vijay nag Date: Mon, 17 Dec 2018 14:24:49 +0530 Message-ID: Subject: Re: Cgroups support for THP Content-Type: multipart/alternative; boundary="000000000000c94a0f057d33efc8" Sender: owner-linux-mm@kvack.org List-ID: To: rppt@linux.ibm.com Cc: linux-mm@kvack.org --000000000000c94a0f057d33efc8 Content-Type: text/plain; charset="UTF-8" On Mon, Dec 17, 2018 at 2:18 PM Mike Rapoport wrote: > On Mon, Dec 17, 2018 at 01:56:40PM +0530, vijay nag wrote: > > Hello Linux-MM, > > > > My containerized application which is suppose to have a very low RSS(by > default > > containers patterns are to have low memory footprint) seems to be > getting its > > BSS segment RSS bloated due to THPs. Although there is a huge zero page > > support, the overhead seems to be at-least 2MB even when a byte is > dirtied. > > Also there are tune-able to disable this feature, but this seems to be a > > system wide setting. Is there a plan to make this setting cgroup aware ? > > It's possible to control THP on per-mapping using madvise(MADV_NOHUGEPAGE) > and per-process using prctl(PR_SET_THP_DISABLE). > > > Thanks, > > Vijay Nag > > -- > Sincerely yours, > Mike. > > Thanks for letting me know of this setting. However, there could be a third party daemons/processes that have THP in them. Do you think it is a good idea to make it cgroup aware ? --000000000000c94a0f057d33efc8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon= , Dec 17, 2018 at 2:18 PM Mike Rapoport <rppt@linux.ibm.com> wrote:
On Mon, Dec 17, 2018 at 01:56:40PM +0530, vijay na= g wrote:
> Hello Linux-MM,
>
> My containerized application which is suppose to have a very low RSS(b= y default
> containers patterns are to have low memory footprint) seems to be gett= ing its
> BSS segment RSS bloated due to THPs. Although there is a huge zero pag= e
> support, the overhead seems to be at-least 2MB even when a byte is dir= tied.
> Also there are tune-able to disable this feature,=C2=A0 but this seems= to be a
> system wide setting. Is there a plan to make this setting cgroup aware= ?

It's possible to control THP on per-mapping using madvise(MADV_NOHUGEPA= GE)
and per-process using prctl(PR_SET_THP_DISABLE).

> Thanks,
> Vijay Nag

--
Sincerely yours,
Mike.

Thanks for letting me know of this setting. However, = there could be a third party daemons/processes that have THP in them. Do yo= u think it is a good idea to make it cgroup aware ?
--000000000000c94a0f057d33efc8--