[Varnish] #219: Overflow when calculating remaining disk space on big disk (32 bits server)

Varnish varnish-bugs at projects.linpro.no
Wed Mar 12 23:02:28 CET 2008


#219: Overflow when calculating remaining disk space on big disk (32 bits server)
----------------------+-----------------------------------------------------
 Reporter:  pcarrier  |       Owner:  phk                                 
     Type:  defect    |      Status:  new                                 
 Priority:  normal    |   Milestone:                                      
Component:  varnishd  |     Version:  trunk                               
 Severity:  normal    |    Keywords:  overflow ondisk disk space remaining
----------------------+-----------------------------------------------------
 Varnishd seem to exhibite some kind of an overflow when calculating
 remaining disk space at startup.  More precisely, when it create the on
 disk cache file.

  # '''df''' [[BR]]
  Filesystem           1K-blocks      Used Available Use% Mounted on[[BR]]
  /dev/sda1            238656420  29305924 197227448  13% / [[BR]]
  # '''df -h'''[[BR]]
  Filesystem            Size  Used Avail Use% Mounted on[[BR]]
  /dev/sda1             228G   28G  189G  13%[[BR]]
  # ''' varnishd -f /etc/varnish/minimum.vcl -s
 file,/var/lib/varnish/varnish_cache_file,256M''' [[BR]]
  WARNING: storage file size reduced to 77925580 (80% of available disk
 space)file /var/lib/varnish/varnish_cache_file size 77922304 bytes (19053
 fs-blocks, 19053 pages)[[BR]]

 Strong indicator of the overflow theory:

  # '''dd if=/dev/zero of=/test bs=1M count=1500'''[[BR]]
  [[...]][[BR]]
  # '''rm /var/lib/varnish/varnish_cache_file''' [[BR]]
  # '''varnishd -f /etc/varnish/minimum.vcl -s
 file,/var/lib/varnish/varnish_cache_file,256M''' [[BR]]
  file /var/lib/varnish/varnish_cache_file size 268435456 bytes (65536 fs-
 blocks, 65536 pages)
  Using old SHMFILE[[BR]]
  # '''df'''[[BR]]
  /dev/sda1            238656420  30843452 195689920  14% /[[BR]]
  [[...]][[BR]]

 Version used:  1.1.2, official release, compiled with defaults options on
 a 32 bits Debian 4.0 [[BR]]
 Reproducibles:  yes [[BR]]
 Step to reproduce:  start varnish with "-s file,/file.cache,256M" on a
 disk with 197227568 KB free with the cache file not already created[[BR]]
 Temporary fix: create your cache file with `dd`

-- 
Ticket URL: <http://varnish.projects.linpro.no/ticket/219>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator


More information about the varnish-bugs mailing list