Re: [lc-devel] Kernel command line for compressed cache size
Status: Beta
Brought to you by:
nitin_sf
From: Livio B. S. <li...@im...> - 2002-01-17 16:45:09
|
Hello, David Chow writes: > Dear all, > > I think of a flexible way of using compressed cache in production > systems is that allow to overide the default compressed cache size using > kernel command parameters. How's that? Well, there has been support for kernel command parameter for some time now. You can specify the size of the compressed cache (use 0 to disable it), with the "compsize=" parameter. So you can enable the compressed cache with whichever size you desire. There is a restriction however, the number of pages has to be a power of 2! Rodrigo is currently working on somethings and this restriction is something with high priority on his TODO list. Another thing, which is a new feature, and not very tested yet, is the proc entry: /proc/sys/vm/comp_cache/size Try: # cat /proc/sys/vm/comp_cache/size And you get the number of pages reserved for the comp_cache. The new feature is shrinking/growing the cache with an echo, for example: # echo 512 > /proc/sys/vm/comp_cache/size Will change the current size to 512 pages. Another restriction is that this dynamic change in the cache size can never be greater than the size chosen with the "compsize=" kernel option, or if none is given, the size chosen during the configuration of the kernel before compilation. Rodrigo is also trying to remove this limitation, but some work has to be done before this can happen (dynamically changing the sizes of the hash tables used, for example). This is great because you can tweak the size reserved for the compressed cache on-line, and try testing it to see which size works best for your workload. Try it out! best regards, -- Livio <li...@im...> |