D.3 Linux

Linux is obviously a popular choice for Squid. It supports a wide variety of filesystems and storage schemes. These results come from Linux kernel Version 2.4.19 (released August 2, 2002) with SGI's XFS patches Version 1.2.0 (released Feb 11, 2003) and ReiserFS Version 3.6.25.

The kernel's file descriptor limit is set to 8192. I used this command to configure Squid before compiling:

% ./configure  --enable-storeio=diskd,ufs,aufs,null,coss --with-aufs-threads=32

The Linux results are summarized in Table D-1, and Figure D-1 shows the traces. You can see that coss is the best performer, with aufs coming in second and diskd third. As I'm writing this, coss is an experimental feature and not necessarily suitable for a production system. In the long run, you'll probably be better off with aufs.

Table D-1. Linux benchmarking results

Storage scheme

Filesystem

Mount options

Throughput (xact/sec)

Response time (sec)

Hit ratio (%)

coss

  

326.3

1.59

53.9

aufs(1)

ext2fs

noatime

168.5

1.45

56.3

diskd(1)

ext2fs

noatime

149.4

1.53

56.1

aufs(2)

ext2fs

 

110.0

1.46

55.6

ufs(1)

ext2fs

 

54.9

1.52

55.6

ufs(2)

ext3fs

 

48.4

1.49

56.8

ufs(3)

xfs

 

40.7

1.54

55.3

ufs(4)

reiserfs

notail, noatime

29.7

1.55

55.0

ufs(5)

reiserfs

 

21.4

1.55

55.1

Figure D-1. Linux filesystem benchmarking traces
figs/SQ_ad01.gif

Note that the noatime option gives a significant boost in performance to aufs. The throughput jumps from 110 to 168 transactions per second with the addition of this mount option. Linux also has an async option, but it is enabled by default. I did not run any tests with async disabled.

Of the many filesystem choices, ext2fs seems to give the best performance. ext3fs (ext2 plus journaling) is only slightly lower, followed by xfs, and reiserfs.



    Appendix A. Config File Reference