Hi all,
I'm new to lighttpd and mod_cache. Here I met some troubles. Could any
one help me?
I have a image server who has 2G memory, without memory cache, vmstat
looks like this:
procs -----------memory---------- ---swap-- -----io---- --system--
-----cpu------
r b swpd free buff cache si so bi bo in cs us
sy id wa st
1 0 112 11016 80104 1638712 0 0 38 61 0 13 0
2 95 3 0
1 1 112 9988 80136 1639872 0 0 872 1144 8126 225 4
8 70 17 0
0 1 112 10300 80160 1639848 0 0 80 6868 3962 102 0
2 74 24 0
0 1 112 9804 80160 1639980 0 0 0 0 1790 161 0
1 75 24 0
As you can see, more then 20% CPU time is spent on waiting for IO. To
speed it up, I used mod_cache. These are what I have done:
1. download lighttpd-1.4.23.modcache.v.1.8.0.tar.gz, and configure
with the following command:
./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/
info --enable-shared --enable-threads=posix --enable-checking=release
--with-system-zlib --enable-lfs --with-openssl --with-mysql --with-
zlib --with-memcache --enable-__cxa_atexit --disable-libunwind-
exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-
c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-
plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-
cpu=generic --host=x86_64-redhat-linux
Then make and install. Everything is successful. Then I modified
lighttpd.conf and append following lines:
cache.enable = "enable"
cache.max-memory-size = 1024
and of course enabled mod_cache at the beginning of lighttpd.conf
server.modules = (
"mod_cache",
"mod_rewrite",
...
However, after all this, vmstat result still looks the same. No memory
is spent caching anything, and no doubt there is a lot of network
traffic. I think I must have missed something. Can anyone help me?
Thank you!