kexec.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: "bhe@redhat.com" <bhe@redhat.com>
Cc: "kexec@lists.infradead.org" <kexec@lists.infradead.org>,
	"d.hatayama@jp.fujitsu.com" <d.hatayama@jp.fujitsu.com>,
	Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>,
	"zzou@redhat.com" <zzou@redhat.com>
Subject: Re: [PATCH] makedumpfile: change the wrong code to calculate bufsize_cyclic for elf dump
Date: Fri, 25 Apr 2014 09:22:15 -0400	[thread overview]
Message-ID: <20140425132214.GB10674@redhat.com> (raw)
In-Reply-To: <20140423235041.GB1530@dhcp-17-102.nay.redhat.com>

On Thu, Apr 24, 2014 at 07:50:41AM +0800, bhe@redhat.com wrote:
> On 04/23/14 at 01:08pm, Vivek Goyal wrote:
>  
> > >  - bitmap size: used for 1st and 2nd bitmaps
> > >  - remains: can be used for the other works of makedumpfile (e.g. I/O buffer)
> > > 
> > >                  pattern                      |  bitmap size  |   remains
> > > ----------------------------------------------+---------------+-------------
> > >   A. 100G memory with the too allocation bug  |    12.8 MB    |   17.2 MB
> > >   B. 100G memory with fixed makedumpfile      |     6.4 MB    |   23.6 MB
> > >   C. 200G memory with fixed makedumpfile      |    12.8 MB    |   17.2 MB
> > >   D. 300G memory with fixed makedumpfile      |    19.2 MB    |   10.8 MB
> > >   E. 400G memory with fixed makedumpfile      |    24.0 MB    |    6.0 MB
> > >   F. 500G memory with fixed makedumpfile      |    24.0 MB    |    6.0 MB
> > >   ...
> > > 
> > > Baoquan got OOM in A pattern and didn't get it in B, so C must also
> > > fail due to OOM. This is just what I wanted to say.
> > 
> > ok, So here bitmap size is growing because we have not hit the 80% of 
> > available memory limit yet. But it gets limited at 24MB once we hit
> > 80% limit. I think that's fine. That's what I was looking for.
> > 
> > Now key question will remain is that is using 80% of free memory by
> > bitmaps too much. Are other things happening in system which consume
> > memory and because memory is not available OOM hits. If that's the
> > case we probably need to lower the amount of memory allocated to
> > bit maps. Say 70% or 60% or may be 50%. But this should be data driven.
> 
> How about add anoter limit, say left memory safety limit, e.g 20M. If
> the remaining memory which is 20% of free memory is bigger than 20M, 80%
> can be taken to calculate the bitmap size. If smaller than 20M, we just
> take (total memory - safety limit) for bitmap size.

I think doing another internal limit for makedumpfile usage sounds fine.
So say, if makedumpfile needs 5MB of memory for purposes other than
bitmap, then remove 5MB from total memory and then take 80% of remaining
memory to calculate bitmap size. I think that should be reasonable.

Tricky bit here is to figure out how much memory does makedumpfile need. 

A simpler solution will be to just reserve 60% of total memory for bitmaps
and leave rest for makedumpfile and kernel and other components.

Thanks
Vivek

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  parent reply	other threads:[~2014-04-25 13:22 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-10 21:44 makedumpfile memmory usage seems high with option -E Vivek Goyal
2014-04-11  9:22 ` Atsushi Kumagai
2014-04-11 10:19   ` Arthur Zou
2014-04-14  8:02     ` [PATCH] makedumpfile: change the wrong code to calculate bufsize_cyclic for elf dump Baoquan He
2014-04-14  8:11       ` Baoquan He
2014-04-16  6:44       ` Baoquan He
2014-04-17  4:01         ` Atsushi Kumagai
2014-04-17  4:52           ` bhe
2014-04-17  5:02             ` bhe
2014-04-18  9:22               ` Atsushi Kumagai
2014-04-18 14:29                 ` bhe
2014-04-18 19:41                   ` Petr Tesarik
2014-04-21 15:19                     ` Vivek Goyal
2014-04-21 15:46                       ` Petr Tesarik
2014-04-21 15:51                         ` Vivek Goyal
2014-04-21 15:14                   ` Vivek Goyal
2014-04-23 11:09                     ` bhe
2014-04-21 15:12                 ` Vivek Goyal
2014-04-23  7:55                   ` Atsushi Kumagai
2014-04-23 11:55                     ` bhe
2014-04-23 17:08                     ` Vivek Goyal
2014-04-23 23:50                       ` bhe
2014-04-24  2:05                         ` bhe
2014-04-25 13:22                         ` Vivek Goyal [this message]
2014-04-28  5:05                           ` Atsushi Kumagai
2014-04-28 12:50                             ` Vivek Goyal
2014-05-09  5:36                               ` Atsushi Kumagai
2014-05-09 20:49                                 ` Vivek Goyal
2014-05-15  7:22                                   ` bhe
2014-05-15  9:10                                     ` Atsushi Kumagai
2014-05-19 11:15                                       ` bhe
2014-05-19 15:11                                         ` Vivek Goyal
2014-05-27  5:34                                           ` Atsushi Kumagai
2014-05-27 14:49                                             ` Vivek Goyal
2014-05-23  7:18                                         ` Atsushi Kumagai
2014-05-14  5:44                                 ` bhe
2014-04-28  5:04                       ` Atsushi Kumagai
2014-05-09  5:35                         ` Atsushi Kumagai

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=20140425132214.GB10674@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=bhe@redhat.com \
    --cc=d.hatayama@jp.fujitsu.com \
    --cc=kexec@lists.infradead.org \
    --cc=kumagai-atsushi@mxc.nes.nec.co.jp \
    --cc=zzou@redhat.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;
as well as URLs for NNTP newsgroup(s).