[squid-users] A couple questions on disk usage

From: Steve Snyder <swsnyder@dont-contact.us>
Date: Tue, 27 Nov 2001 11:53:54 -0500

I have a couple of questions about disk usage.

I'm running Squid v2.4S2 (+ released patches) on a RedHat Linux v7.2 (+
kernel 2.4.14) box. My squid cache is defined like this:

    cache_dir ufs /var/spool/squid 384 1 256
    
The cache is on a ReiserFS filesystem, mounted with the "noatime,notail"
options. I have no known problems using Squid in this environment.

Below is a display of the disk usage for my cache. Although my L2 is
defined as 00 - FF (see cache_dir above) I have omitted listing directories
~90 through FF because they have never been used.

Ok, on to the questions.

1. Note that directory /var/spool/squid/00/04 is much larger than any
other L2 directory. It is the only directory whose disk usage comsumes a
5-digit amount of space. Shouldn't Squid be balancing the L2 directories
better than this? Why does this dir hold ~30 times as much data as some
other L2 directories?

2. I've been running Squid for a couple years now, on several versions of
Linux and Squid, always defining the number of L1/L2 directories according
to the recommended formula. There have always been many L2 dirs that were
never touched. Currently L2 directories A0 through FF are unused, which is
about typical in my experience. What would be the harm/benefit of reducing
the count of L2 directories from 256 (= max of FF) to 192 (= max BF)?

Thanks.

# du /var/spool/squid/00
1642 /var/spool/squid/00/00
1623 /var/spool/squid/00/01
1654 /var/spool/squid/00/02
1434 /var/spool/squid/00/03
15278 /var/spool/squid/00/04
1866 /var/spool/squid/00/05
2034 /var/spool/squid/00/06
3271 /var/spool/squid/00/07
1486 /var/spool/squid/00/08
1851 /var/spool/squid/00/09
2190 /var/spool/squid/00/10
2343 /var/spool/squid/00/11
1490 /var/spool/squid/00/12
1911 /var/spool/squid/00/13
1783 /var/spool/squid/00/14
2754 /var/spool/squid/00/15
1590 /var/spool/squid/00/0A
1735 /var/spool/squid/00/16
5978 /var/spool/squid/00/0B
1551 /var/spool/squid/00/17
2466 /var/spool/squid/00/0C
2943 /var/spool/squid/00/18
2007 /var/spool/squid/00/0D
2022 /var/spool/squid/00/19
2558 /var/spool/squid/00/0E
1634 /var/spool/squid/00/0F
1942 /var/spool/squid/00/20
2506 /var/spool/squid/00/21
1494 /var/spool/squid/00/22
2526 /var/spool/squid/00/23
2134 /var/spool/squid/00/24
1601 /var/spool/squid/00/25
1623 /var/spool/squid/00/1A
2366 /var/spool/squid/00/26
4810 /var/spool/squid/00/27
2042 /var/spool/squid/00/1B
2087 /var/spool/squid/00/1C
9011 /var/spool/squid/00/28
3830 /var/spool/squid/00/1D
1762 /var/spool/squid/00/29
1866 /var/spool/squid/00/1E
1802 /var/spool/squid/00/1F
2634 /var/spool/squid/00/30
1205 /var/spool/squid/00/31
2234 /var/spool/squid/00/32
2127 /var/spool/squid/00/33
2711 /var/spool/squid/00/34
1854 /var/spool/squid/00/35
1738 /var/spool/squid/00/2A
1590 /var/spool/squid/00/36
1510 /var/spool/squid/00/2B
2226 /var/spool/squid/00/37
1243 /var/spool/squid/00/2C
1619 /var/spool/squid/00/38
3366 /var/spool/squid/00/2D
1830 /var/spool/squid/00/39
1658 /var/spool/squid/00/2E
1390 /var/spool/squid/00/2F
787 /var/spool/squid/00/40
379 /var/spool/squid/00/41
531 /var/spool/squid/00/42
1255 /var/spool/squid/00/43
1315 /var/spool/squid/00/44
1637 /var/spool/squid/00/45
1109 /var/spool/squid/00/3A
1802 /var/spool/squid/00/46
951 /var/spool/squid/00/3B
1726 /var/spool/squid/00/47
583 /var/spool/squid/00/3C
1176 /var/spool/squid/00/48
306 /var/spool/squid/00/49
867 /var/spool/squid/00/3D
1572 /var/spool/squid/00/3E
1114 /var/spool/squid/00/3F
912 /var/spool/squid/00/50
1407 /var/spool/squid/00/51
1384 /var/spool/squid/00/52
514 /var/spool/squid/00/53
1842 /var/spool/squid/00/54
2338 /var/spool/squid/00/55
1966 /var/spool/squid/00/56
237 /var/spool/squid/00/4A
1004 /var/spool/squid/00/4B
4294 /var/spool/squid/00/57
7725 /var/spool/squid/00/4C
3210 /var/spool/squid/00/58
1108 /var/spool/squid/00/4D
2706 /var/spool/squid/00/59
1141 /var/spool/squid/00/4E
1709 /var/spool/squid/00/4F
1558 /var/spool/squid/00/60
3387 /var/spool/squid/00/61
5670 /var/spool/squid/00/62
1470 /var/spool/squid/00/63
4138 /var/spool/squid/00/64
2478 /var/spool/squid/00/65
1726 /var/spool/squid/00/5A
2434 /var/spool/squid/00/66
1570 /var/spool/squid/00/5B
2235 /var/spool/squid/00/67
2683 /var/spool/squid/00/5C
2775 /var/spool/squid/00/68
2063 /var/spool/squid/00/5D
1766 /var/spool/squid/00/69
2854 /var/spool/squid/00/5E
2043 /var/spool/squid/00/70
2426 /var/spool/squid/00/5F
2587 /var/spool/squid/00/71
2530 /var/spool/squid/00/72
1787 /var/spool/squid/00/73
2270 /var/spool/squid/00/74
2135 /var/spool/squid/00/75
1391 /var/spool/squid/00/6A
1547 /var/spool/squid/00/76
3174 /var/spool/squid/00/6B
2862 /var/spool/squid/00/77
1671 /var/spool/squid/00/78
2135 /var/spool/squid/00/6C
2055 /var/spool/squid/00/6D
1594 /var/spool/squid/00/79
2338 /var/spool/squid/00/6E
2286 /var/spool/squid/00/6F
6522 /var/spool/squid/00/80
9618 /var/spool/squid/00/81
6730 /var/spool/squid/00/82
1601 /var/spool/squid/00/83
1653 /var/spool/squid/00/84
2258 /var/spool/squid/00/85
1591 /var/spool/squid/00/7A
4406 /var/spool/squid/00/86
1986 /var/spool/squid/00/7B
1394 /var/spool/squid/00/87
1902 /var/spool/squid/00/7C
2178 /var/spool/squid/00/88
1894 /var/spool/squid/00/7D
2710 /var/spool/squid/00/89
1502 /var/spool/squid/00/7E
2334 /var/spool/squid/00/7F
1714 /var/spool/squid/00/90
2002 /var/spool/squid/00/91
1723 /var/spool/squid/00/92
2854 /var/spool/squid/00/93
4998 /var/spool/squid/00/94
2222 /var/spool/squid/00/95
2758 /var/spool/squid/00/8A
1795 /var/spool/squid/00/96
1730 /var/spool/squid/00/8B
550 /var/spool/squid/00/97
4050 /var/spool/squid/00/8C
1 /var/spool/squid/00/98
3362 /var/spool/squid/00/8D
1 /var/spool/squid/00/99
1438 /var/spool/squid/00/8E
3614 /var/spool/squid/00/8F
Received on Tue Nov 27 2001 - 09:53:58 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:04:33 MST