All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Cc: "Wold, Saul" <saul.wold@intel.com>
Subject: Re: The swap partition's size is too big for BSP?
Date: Mon, 04 Jul 2011 12:39:52 +0100	[thread overview]
Message-ID: <1309779592.20015.661.camel@rex> (raw)
In-Reply-To: <1865303E0DED764181A9D882DEF65FB6A200B1C93F@shsmsx502.ccr.corp.intel.com>

On Mon, 2011-07-04 at 13:35 +0800, Cui, Dexuan wrote:
> In meta/recipes-core/initrdscripts/files/init-install.sh, we have 
> 
> # 5% for the swap
> swap_ratio=5               # dexuan: this variable is not used at all!
> ...
> swap_size=$((disk_size*5/100)) 
> 
> This algorithm seems too wasty -- e.g., for a CrownBay box with a 160GB disk, we would create a 8GB swap partition while the box has only 1GB memory.
> 
> What's the proper swap size?
> This link http://www.cyberciti.biz/tips/linux-swap-space.html discussed this and I think the below algorithm seems suitable for us:
> 
> Systems with 2GB of ram or less require the same size of swap space
> Systems with 2GB to 4GB of ram require a minimum of 2GB of swap space 
> Systems with 4GB to 16GB of ram require a minimum of 4GB of swap space 
> Systems with 16GB to 64GB of ram require a minimum of 8GB of swap space 
> Systems with 64GB to 256GB of ram require a minimum of 16GB of swap space 
> 
> Any comment?

Looks like a much better idea to me, I'll take patches :)

For reference if you want to do suspend to disk (swap) you need a lot of
swap space btw. Still no where near that much though!

Cheers,

Richard




  reply	other threads:[~2011-07-04 11:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-04  5:35 The swap partition's size is too big for BSP? Cui, Dexuan
2011-07-04 11:39 ` Richard Purdie [this message]
2011-07-04 12:02   ` Cui, Dexuan
2011-07-04 13:48     ` Richard Purdie
2011-07-04 13:58       ` Cui, Dexuan

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=1309779592.20015.661.camel@rex \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=saul.wold@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.