mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: jack marrow <jackmarrow2@gmail.com>
To: Thomas Schoebel-Theuer <thomas.schoebel-theuer@1und1.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Memory usage per memory zone
Date: Wed, 11 Mar 2009 16:06:55 +0100	[thread overview]
Message-ID: <e2dc2c680903110806r56750933q19ed1c71e60bec9c@mail.gmail.com> (raw)
In-Reply-To: <200903111439.57510.thomas.schoebel-theuer@1und1.de>

2009/3/11 Thomas Schoebel-Theuer <thomas.schoebel-theuer@1und1.de>:
> Am Mittwoch, 11. März 2009 11:41:43 schrieb jack marrow:
>> I have a box where the oom-killer is killing processes due to running
>> out of memory in zone_normal. I can see using slabtop that the inode
>> caches are using up lots of memory and guess this is the problem, so
>> have cleared them using an echo to drop_caches.
>
> Hi Jack,
>
> my experience with plain old 2.6.24 on 32bit _production_ boxes was that under
> heavy load and after >30days uptime we saw an sudden inflation of oom-killers
> on some of them until those boxes died. The standard kernel statistics about
> memory looked much the same as yours (and I suspect they could have been
> wrong or at least misleading, but I have neither checked nor tried to fix).
>
>> is it possible to use slabtop
>> (or any other way) to view ram usage per zone so I can pick out the
>> culprit?
>
> Try the attached experimental hack which can provide you with some insight
> about whats really going on in the _physical_ memory. Since it does not
> allocate any memory for the purpose of displaying those memory patterns it
> wants to examine, you have to allocate a large enough buffer in userspace.
> Don't use cat, but something like dd with parameters such as bs=4M (as
> mentioned in the comment). Probably you have to adjust the patch to some
> newer kernel versions, and/or to fix some sysctl table checks if you want to
> get it upstreams (I will not). And, of course, you can visualize more/other
> flags as well.
>
> After gaining some insight with /proc/sys/vm/mempattern and some development
> of further experimental patches which successfully reduced fragmentation (but
> finally only _delayed_ the oom problems without being able to _fundamentally_
> resolve them), the ultimate solution was just to use CONFIG_VMSPLIT_2G or
> even CONFIG_VMSPLIT_1G in order to overcome the artificial shortening of
> zone_normal.
>
> This supports old wisdom that an OS cannot give you resources it just does not
> possess... Just make sure you have enough resources for your working set.
> Thats all.
>
> In the hope of being helpful,
>
> Thomas
>

Thanks a lot for this Thomas. I'm not able to run a patched kernel on
this box, but I'll keep this in mind for future.

      reply	other threads:[~2009-03-11 15:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-11 10:41 jack marrow
2009-03-11 11:43 ` Wu Fengguang
2009-03-11 11:51   ` jack marrow
2009-03-11 12:11     ` Wu Fengguang
2009-03-11 12:16       ` jack marrow
2009-03-11 12:26         ` Wu Fengguang
2009-03-12  7:53           ` jack marrow
2009-03-12  7:59             ` Wu Fengguang
     [not found]               ` <e2dc2c680903120104h4d19a3f6j57ad045bc06f9a90@mail.gmail.com>
     [not found]                 ` <20090312081113.GA19506@localhost>
2009-03-12  8:48                   ` jack marrow
2009-03-12 11:14                     ` Wu Fengguang
2009-03-12 11:39                       ` jack marrow
     [not found]                   ` <e2dc2c680903120117j7be962b2xd63f3296f8f65a46@mail.gmail.com>
2009-03-12 10:38                     ` Wu Fengguang
2009-03-12 11:38                       ` jack marrow
2009-03-12 11:48                         ` jack marrow
2009-03-12 12:06                           ` Wu Fengguang
2009-03-12 11:51                         ` Wu Fengguang
2009-03-12 12:01                           ` jack marrow
2009-03-11 13:39 ` Thomas Schoebel-Theuer
2009-03-11 15:06   ` jack marrow [this message]

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=e2dc2c680903110806r56750933q19ed1c71e60bec9c@mail.gmail.com \
    --to=jackmarrow2@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thomas.schoebel-theuer@1und1.de \
    /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

all inboxes | Powered by JetHome®