Re: [lc-devel] Kernel command line for compressed cache size
Status: Beta
Brought to you by:
nitin_sf
From: Rodrigo S. de C. <rc...@im...> - 2002-01-17 19:10:49
|
On Thu, Jan 17, 2002 at 02:44:56PM -0200, Livio Baldini Soares wrote: > David Chow writes: > > 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. This restriction was due to a simple hash table implementation. I improved the hash table function and allocation yesterday and now you can enter any number of pages, but only in menuconfig (I forgot this old kernel parameter that I don't use often). The new code was released as 0.21pre7 version. The kernel parameter fix is already in my pool and I will commit it asap. > 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. This feature is really nice, but I couldn't test a lot (nor improve it). I noticed lots of performance bottleneck these last weeks and have been trying to improve cache performance since then. Expect a much better code for 0.21 that is about to be released. > 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. That's right. The option you enter in kernel parameter or in menuconfig will be only the initial compressed cache size in a near future. > 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). I think SMP support will be next great feature before get rid of this limitation. I want to clean up the code (improving performance) and make all the necessary surgeries now, and only then starting benchmarking adaptivity and adding parameters for it. Le't hope SMP support will not be painful since it may need some great changes. > 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! Anyway, thanks for your suggestion, David. []'s -- Rodrigo S. de Castro <rc...@im...> |