linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Jörn Engel" <joern@purestorage.com>
To: Mike Kravetz <mike.kravetz@oracle.com>
Cc: David Rientjes <rientjes@google.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: hugetlb pages not accounted for in rss
Date: Thu, 30 Jul 2015 14:34:12 -0700	[thread overview]
Message-ID: <20150730213412.GF17882@Sligo.logfs.org> (raw)
In-Reply-To: <55B95FDB.1000801@oracle.com>

On Wed, Jul 29, 2015 at 04:20:59PM -0700, Mike Kravetz wrote:
> >
> >Since the hugetlb pool is a global resource, it would also be helpful to
> >determine if a process is mapping more than expected.  You can't do that
> >just by adding a huge rss metric, however: if you have 2MB and 1GB
> >hugepages configured you wouldn't know if a process was mapping 512 2MB
> >hugepages or 1 1GB hugepage.

Fair, although I believe 1GB hugepages are overrated.  If you assume
that per-page overhead is independent of page size (not quite true, but
close enough), going from 1% small pages to 0.8% small pages will
improve performance as much as going from 99% 2MB pages to 99% 1GB
pages.

> >That's the purpose of hugetlb_cgroup, after all, and it supports usage
> >counters for all hstates.  The test could be converted to use that to
> >measure usage if configured in the kernel.
> >
> >Beyond that, I'm not sure how a per-hstate rss metric would be exported to
> >userspace in a clean way and other ways of obtaining the same data are
> >possible with hugetlb_cgroup.  I'm not sure how successful you'd be in
> >arguing that we need separate rss counters for it.
> 
> If I want to track hugetlb usage on a per-task basis, do I then need to
> create one cgroup per task?
> 
> For example, suppose I have many tasks using hugetlb and the global pool
> is getting low on free pages.  It might be useful to know which tasks are
> using hugetlb pages, and how many they are using.
> 
> I don't actually have this need (I think), but it appears to be what
> Jorn is asking for.

Maybe some background is useful.  I would absolutely love to use
transparent hugepages.  They are absolutely perfect in every respect,
except for performance.  With transparent hugepages we get higher
latencies.  Small pages are unacceptable, so we are forced to use
non-transparent hugepages.

The part of our system that uses small pages is pretty much constant,
while total system memory follows Moore's law.  When possible we even
try to shrink that part.  Hugepages already dominate today and things
will get worse.

But otherwise we have all the problems that others also have.  There are
memory leaks and we would like to know how much memory each process
actually uses.  Most people use rss, while we have nothing good.  And I
am not sure if cgroup is the correct answer for essentially fixing a
regression introduced in 2002.

Jorn

--
You cannot suppose that Moliere ever troubled himself to be original in the
matter of ideas. You cannot suppose that the stories he tells in his plays
have never been told before. They were culled, as you very well know.
-- Andre-Louis Moreau in Scarabouche

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2015-07-30 21:34 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-27 23:26 Mike Kravetz
2015-07-28 18:32 ` Jörn Engel
2015-07-28 21:15   ` Mike Kravetz
2015-07-28 22:15     ` David Rientjes
2015-07-28 22:26       ` Jörn Engel
2015-07-28 23:30         ` David Rientjes
2015-07-29  0:53           ` Jörn Engel
2015-07-29 19:08             ` David Rientjes
2015-07-29 23:20               ` Mike Kravetz
2015-07-30 21:34                 ` Jörn Engel [this message]
2015-07-31 21:09                   ` David Rientjes
2015-08-04  2:55                 ` Naoya Horiguchi
2015-08-04  5:13                   ` [PATCH] smaps: fill missing fields for vma(VM_HUGETLB) Naoya Horiguchi
2015-08-04 18:21                     ` Jörn Engel
2015-08-06  2:18                       ` David Rientjes
2015-08-06  7:44                         ` Naoya Horiguchi
2015-08-07  7:24                           ` [PATCH v2 0/2] hugetlb: display per-process/per-vma usage Naoya Horiguchi
2015-08-07  7:24                             ` [PATCH v2 1/2] smaps: fill missing fields for vma(VM_HUGETLB) Naoya Horiguchi
2015-08-07 22:50                               ` Andrew Morton
2015-08-11  0:37                               ` David Rientjes
2015-08-11 23:32                                 ` Naoya Horiguchi
2015-08-11 23:48                                   ` David Rientjes
2015-08-07  7:24                             ` [PATCH v2 2/2] mm: hugetlb: add VmHugetlbRSS: field in /proc/pid/status Naoya Horiguchi
2015-08-07 22:55                               ` Andrew Morton
2015-08-10  0:47                                 ` Naoya Horiguchi
2015-08-10  0:47                                   ` [PATCH v3 1/3] smaps: fill missing fields for vma(VM_HUGETLB) Naoya Horiguchi
2015-08-10  0:47                                   ` [PATCH v3 2/3] mm: hugetlb: add VmHugetlbRSS: field in /proc/pid/status Naoya Horiguchi
2015-08-10  1:16                                     ` Naoya Horiguchi
2015-08-10  0:47                                   ` [PATCH v3 3/3] Documentation/filesystems/proc.txt: document hugetlb RSS Naoya Horiguchi
2015-08-11  0:44                                     ` David Rientjes
2015-08-12  0:03                                       ` Naoya Horiguchi
2015-08-12  7:45                                         ` [PATCH v4 1/2] mm: hugetlb: proc: add HugetlbPages field to /proc/PID/smaps Naoya Horiguchi
2015-08-12  7:45                                           ` [PATCH v4 2/2] mm: hugetlb: proc: add HugetlbPages field to /proc/PID/status Naoya Horiguchi
2015-08-12 20:30                                             ` David Rientjes
2015-08-13  0:45                                               ` Naoya Horiguchi
2015-08-13 21:14                                                 ` Jörn Engel
2015-08-13 21:13                                               ` Jörn Engel
2015-08-17 21:28                                               ` David Rientjes
2015-08-12 20:25                                           ` [PATCH v4 1/2] mm: hugetlb: proc: add HugetlbPages field to /proc/PID/smaps David Rientjes
2015-08-13 21:14                                             ` Jörn Engel
2015-08-20  8:26                                         ` [PATCH v5 0/2] hugetlb: display per-process/per-vma usage Naoya Horiguchi
2015-08-20  8:26                                           ` [PATCH v5 1/2] mm: hugetlb: proc: add HugetlbPages field to /proc/PID/smaps Naoya Horiguchi
2015-08-20 10:49                                             ` Michal Hocko
2015-08-20 23:20                                               ` Naoya Horiguchi
2015-08-21  6:33                                                 ` Michal Hocko
2015-09-07  1:29                                             ` Pádraig Brady
2015-09-07  2:23                                               ` Naoya Horiguchi
2015-09-07  6:46                                                 ` Naoya Horiguchi
2015-09-07  9:52                                                   ` Pádraig Brady
2015-09-07 10:52                                                     ` Pádraig Brady
2015-09-17  9:39                                                       ` Naoya Horiguchi
2015-09-09 15:12                                             ` Vlastimil Babka
2015-09-09 22:14                                               ` David Rientjes
2015-08-20  8:26                                           ` [PATCH v5 2/2] mm: hugetlb: proc: add HugetlbPages field to /proc/PID/status Naoya Horiguchi
2015-08-20 11:00                                             ` Michal Hocko
2015-08-20 19:49                                               ` David Rientjes
2015-08-21  6:32                                                 ` Michal Hocko
2015-08-21 16:38                                                   ` Jörn Engel
2015-08-20 23:34                                               ` Naoya Horiguchi
2015-08-21  6:53                                                 ` Michal Hocko
2015-08-21 16:30                                                   ` Jörn Engel
2015-08-24  8:51                                                     ` Michal Hocko
2015-08-25 23:23                                                       ` David Rientjes
2015-08-26  6:38                                                         ` Michal Hocko
2015-08-26 22:02                                                           ` David Rientjes
2015-08-27  6:48                                                             ` Michal Hocko
2015-08-27 17:23                                                               ` Jörn Engel
2015-08-27 20:44                                                                 ` David Rientjes
2015-08-31  9:12                                                                 ` Michal Hocko
2015-09-16  0:21                                         ` [PATCH v1] mm: migrate: hugetlb: putback destination hugepage to active list Naoya Horiguchi
2015-09-16  2:53                                           ` Naoya Horiguchi

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=20150730213412.GF17882@Sligo.logfs.org \
    --to=joern@purestorage.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mike.kravetz@oracle.com \
    --cc=rientjes@google.com \
    /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