Squid cache disk configuration

squid

just wondering how far drive configuration will affect squid cache performance.

  1. what kind of drive configuration that fast enough for squid ?
  2. is it true that block-level parity strip raid faster than byte-level one ?
  3. is mirrored drive config will decrease squid cache write process ?
  4. how much swap space that squid realy need to store cache (reverse mode) for 200mb web doc ?
  5. what kind of benchmark should i do to analyze squid disk performance ?

Best Answer

1) since it's cache, you don't care about the data, so a striping RAID0 would be very good.

2) yes, block level is faster. That's RAID3 vs. RAID4

3) nop, but again, you are mirroring trash data

4) 200MB plus some rounding. Have a look at all the settings about objects' sizes: if you have enough RAM, fitting 0-50MB into it could be great speedup, where the default is about 4MB. Also choose carefuly your cache_dir params.

5) I don't think benchmarking is relevant because caching is very dependant on what you browse. You have to parse logs to check hit ratio, etc. You can use things like awffull, etc, any log parser should do. squidview is also a nice tool that acts like a 'top' to check instant usage.