[linux-mm-cc] Fwd: Re: init script?
tibor.bamhor at netkosice.sk
tibor.bamhor at netkosice.sk
Mon Aug 25 15:39:46 EDT 2008
2008/8/24 John McCabe-Dansted <gmatht at gmail.com>:>
> The size of the virtual swap drive will be 150% of physical RAM. I.e.
> if you have 1GB of ram it will be 1.5GB. However each 4k page will
> only take 2k of memory when compressed (assuming 2:1 compression), so
> when the swap device is full it will only require 0.75GB of physical
> memory to store the contents of the 1.5GB swap device.
>
> Assuming a 2:1 compression ratio there is clearly no point allocating
> a 200% of RAM swap device. Also note that the size of the swap device
> is limited to 4GB. Also on 32bit systems, the total amount of memory
> that kernel modules can allocate is 1GB so using 2GB swap device would
> be pointless no matter how much ram the system has (and could
> potentially cause the kernel to run out of memory).
>
> Since compcache does not allocate memory until it is needed, for a
> short running system it is best to specify a slightly too large swap
> device than a too small. OTOH compcache-0.3 cannot really free memory
> (except when the module is unloaded from the kernel with e.g.
> unuse_compcache), so in a long-running system it may be better to have
> a smallish compcache. This would force the OOM killer to kill runaway
> processes before compcache allocates too much memory.
>
> --
> John C. McCabe-Dansted
> PhD Student
> University of Western Australia
>
--
John C. McCabe-Dansted
PhD Student
University of Western Australia
-------------------------------------------------------
Thank you for exlanation, very usefull,
BTW I modified your script to be "compatible" with arch linux scripts. Everyone
who want to install compcache on arch linux, please look to aur.
Tibor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compcache.v2
Type: application/x-shellscript
Size: 2117 bytes
Desc: not available
Url : http://lists.laptop.org/pipermail/linux-mm-cc/attachments/20080825/fcaadd87/attachment.bin
More information about the linux-mm-cc
mailing list