linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Cgroups support for THP
@ 2018-12-17  8:26 vijay nag
  2018-12-17  8:48 ` Mike Rapoport
  0 siblings, 1 reply; 4+ messages in thread
From: vijay nag @ 2018-12-17  8:26 UTC (permalink / raw)
  To: linux-mm

[-- Attachment #1: Type: text/plain, Size: 489 bytes --]

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 ?

Thanks,
Vijay Nag

[-- Attachment #2: Type: text/html, Size: 590 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Cgroups support for THP
  2018-12-17  8:26 Cgroups support for THP vijay nag
@ 2018-12-17  8:48 ` Mike Rapoport
  2018-12-17  8:54   ` vijay nag
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Rapoport @ 2018-12-17  8:48 UTC (permalink / raw)
  To: vijay nag; +Cc: linux-mm

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Cgroups support for THP
  2018-12-17  8:48 ` Mike Rapoport
@ 2018-12-17  8:54   ` vijay nag
  2018-12-17 15:33     ` Michal Hocko
  0 siblings, 1 reply; 4+ messages in thread
From: vijay nag @ 2018-12-17  8:54 UTC (permalink / raw)
  To: rppt; +Cc: linux-mm

[-- Attachment #1: Type: text/plain, Size: 1019 bytes --]

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 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 ?

[-- Attachment #2: Type: text/html, Size: 1391 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Cgroups support for THP
  2018-12-17  8:54   ` vijay nag
@ 2018-12-17 15:33     ` Michal Hocko
  0 siblings, 0 replies; 4+ messages in thread
From: Michal Hocko @ 2018-12-17 15:33 UTC (permalink / raw)
  To: vijay nag; +Cc: rppt, linux-mm

On Mon 17-12-18 14:24:49, vijay nag wrote:
[...]
> 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 ?

No, I do not really think this needs a cgroup support. Mostly because
the API scope for THP is way too complicated already and besides that
you can achieve what you want by setting PR_SET_THP_DISABLE and inherit
it down the road in your container.

-- 
Michal Hocko
SUSE Labs

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-12-17 15:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-17  8:26 Cgroups support for THP vijay nag
2018-12-17  8:48 ` Mike Rapoport
2018-12-17  8:54   ` vijay nag
2018-12-17 15:33     ` Michal Hocko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox