2008/8/24 John McCabe-Dansted <[EMAIL PROTECTED]>:>
> 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

Attachment: compcache.v2
Description: application/shellscript

_______________________________________________
linux-mm-cc mailing list
[email protected]
http://lists.laptop.org/listinfo/linux-mm-cc

Reply via email to