From: Matthew Dobson <colpatch@us.ibm.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Chris Wright <chrisw@osdl.org>,
linux-kernel@vger.kernel.org,
Linux Memory Management <linux-mm@kvack.org>
Subject: Re: [RFC][PATCH 0/8] Critical Page Pool
Date: Tue, 06 Dec 2005 14:54:46 -0800 [thread overview]
Message-ID: <439616B6.1020308@us.ibm.com> (raw)
In-Reply-To: <20051121132910.GA1971@elf.ucw.cz>
Pavel Machek wrote:
> Hi!
>
>
>>>* Matthew Dobson (colpatch@us.ibm.com) wrote:
>>>
>>>
>>>>/proc/sys/vm/critical_pages: write the number of pages you want to reserve
>>>>for the critical pool into this file
>>>
>>>
>>>How do you size this pool?
>>
>>Trial and error. If you want networking to survive with no memory other
>>than the critical pool for 2 minutes, for example, you pick a random value,
>>block all other allocations (I have a test patch to do this), and send a
>>boatload of packets at the box. If it OOMs, you need a bigger pool.
>>Lather, rinse, repeat.
>
>
> ...and then you find out that your test was not "bad enough" or that
> it needs more memory on different machines. It may be good enough hack
> for your usage, but I do not think it belongs in mainline.
> Pavel
Way late in responding to this, but...
Apropriate sizing of this pool is a known issue. For example, we want to
use it to keep the networking stack alive during extreme memory pressure
situations. The only way to size the pool so as to *guarantee* that it
will not be exhausted during the 2 minute window we need would be to ensure
that the pool has at least (TOTAL_BANDWITH_OF_ALL_NICS * 120 seconds) bytes
available. In the case of a simple system with a single GigE adapter we'd
need (1 gigbit/sec * 120 sec) = 120 gigabits = 15 gigabytes of reserve
pool. That is obviously completely impractical, considering many boxes
have multiple GigE adapters or even 10 GigE adapters. It is also
incredibly unlikely that the NIC will be hit with a continuous stream of
packets at a level that would completely saturate the link. Starting with
an educated guess and some test runs with a reasonble workload should give
you a good idea of how much space you'd *realistically* need to reserve.
Given any reserve size less than the theoretical maximum you obviously
can't *guarantee* the pool won't be exhausted, but you can be pretty confident.
-Matt
--
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>
next prev parent reply other threads:[~2005-12-06 22:54 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-18 19:32 Matthew Dobson
2005-11-18 19:36 ` [RFC][PATCH 1/8] Create " Matthew Dobson
2005-11-19 0:08 ` Paul Jackson
2005-11-21 5:50 ` Matthew Dobson
2005-11-21 5:54 ` Paul Jackson
2005-11-18 19:36 ` [RFC][PATCH 2/8] Create emergency trigger Matthew Dobson
2005-11-19 0:21 ` Paul Jackson
2005-11-21 5:51 ` Matthew Dobson
2005-11-18 19:40 ` [RFC][PATCH 3/8] Slab cleanup Matthew Dobson
2005-11-18 19:41 ` [RFC][PATCH 4/8] Fix a bug in scsi_get_command Matthew Dobson
2005-11-18 19:43 ` [RFC][PATCH 5/8] get_object/return_object Matthew Dobson
2005-11-18 19:44 ` [RFC][PATCH 6/8] slab_destruct Matthew Dobson
2005-11-18 19:44 ` [RFC][PATCH 0/8] Critical Page Pool Avi Kivity
2005-11-18 19:51 ` Matthew Dobson
2005-11-18 20:42 ` Avi Kivity
2005-11-19 0:10 ` Paul Jackson
2005-11-21 5:36 ` Matthew Dobson
2005-11-18 19:45 ` [RFC][PATCH 7/8] __cache_grow() Matthew Dobson
2005-11-18 19:47 ` [RFC][PATCH 8/8] Add support critical pool support to the slab allocator Matthew Dobson
2005-11-18 19:56 ` [RFC][PATCH 0/8] Critical Page Pool Chris Wright
2005-11-21 5:47 ` Matthew Dobson
2005-11-21 13:29 ` Pavel Machek
2005-12-06 22:54 ` Matthew Dobson [this message]
2005-12-10 8:39 ` Pavel Machek
2005-11-20 7:45 ` Keith Owens
2005-11-21 5:53 ` Matthew Dobson
2005-11-20 23:04 ` Pavel Machek
2005-11-21 5:58 ` Matthew Dobson
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=439616B6.1020308@us.ibm.com \
--to=colpatch@us.ibm.com \
--cc=chrisw@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pavel@ucw.cz \
/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