Varnishd and the disk IO

姚伟斌 nbubingo at gmail.com
Mon May 14 09:15:18 CEST 2012


Hello, folks,

I have a question. Does the varnish often sync the shared memory file
named "_.vsm" with the disk? I saw many disk IOs with varnish:

[wenjing.ywb at i4i-013050.cm6 dstat]$  ./dstat -c --top-cpu -d --top-bio
----total-cpu-usage---- -most-expensive- -dsk/total- ----most-expensive----
usr sys idl wai hiq siq|  cpu process   | read  writ|  block i/o process
  9   2  89   0   0   1|ksoftirqd/1  0.0|3181k 6879k|bash          0     0
 19   8  66   2   0   5|varnishd      27|   0    14M|
 18   7  71   0   0   5|varnishd      23|   0    24k|
 19   8  67   0   0   5|varnishd      26|   0    13M|
 16   7  72   0   0   5|varnishd      23|   0    19M|
 19   7  69   0   0   5|varnishd      25|   0  5288k|
 18   7  70   0   0   5|varnishd      24|   0  2684k|

My server processed 1K-2K requests per second.  I use the malloc
memory cache method. It seems varnish writes 10M-20M data to disk per
three second.

Varnish start command:
/opt/com/install/varnish/sbin/varnishd -P
/home/admin/varnish/pid/varnish.pid -a :8888 -f
/home/admin/varnish/conf/varnish.vcl -n /home/admin/varnish/cache -T
0.0.0.0:2000 -t 120 -w 5,1000,120 -u admin -g admin -s malloc,50G

My OS:
Linux i4i-013050.cm6 2.6.32-131.12.1.tb332.el6.x86_64 #1 SMP Mon Oct
31 14:46:57 CST 2011 x86_64 x86_64 x86_64 GNU/Linux

Thanks.



More information about the varnish-misc mailing list