All of lore.kernel.org
 help / color / mirror / Atom feed
* The swap partition's size is too big for BSP?
@ 2011-07-04  5:35 Cui, Dexuan
  2011-07-04 11:39 ` Richard Purdie
  0 siblings, 1 reply; 5+ messages in thread
From: Cui, Dexuan @ 2011-07-04  5:35 UTC (permalink / raw)
  To: 'Patches and discussions about the oe-core layer'; +Cc: Wold, Saul

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?

Thanks,
-- Dexuan
 



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-07-04 14:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-04  5:35 The swap partition's size is too big for BSP? Cui, Dexuan
2011-07-04 11:39 ` Richard Purdie
2011-07-04 12:02   ` Cui, Dexuan
2011-07-04 13:48     ` Richard Purdie
2011-07-04 13:58       ` Cui, Dexuan

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.