Re: [squid-users] RAID0, LVM or JBOD for best performance squid proxy server?

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sat, 06 Aug 2011 14:04:55 +1200

On 06/08/11 11:27, Pieter De Wit wrote:
> On 6/08/2011 10:34, rpereyra_at_lavabit.com wrote:
>>> Hi Roberto,
>>>
>>> Each of the systems you mention will only add an extra layer to the
>>> storage solution. Squid (not sure from which version but I am very sure
>>> it's main stream on all distros) already has support for multiple cache
>>> directories so my suggestion (if you don't need LVM to extend or move
>>> physical disks etc) is to make the disks normal mount points. The File
>>> system that you use will have to be researched (ext4 vs xfs vs reseirfs
>>> vs ...) but I have used ext3/4 with great success (at least enough for
>>> me not to complain :) )
>>>
>>> See http://wiki.squid-cache.org/BestOsForSquid at the bottom for File
>>> Systems etc
>>>
>>> The only one that *might* improve things is RAID0 but I can't really see
>>> this as squid won't be writing *that* much (on a 100meg connection)

Squid disk operations are mostly writes. 100meg connection will write
almost 100 meg to disk per second. Spread over the cache_dir based on
your store_dir_select_algorithm setting (default of the one with largest
free space).

Your byte-HIT ratio is effectively a read:write ratio. Although not
strictly accurate.

SSD has been suggested. This mostly-write behaviour is a big reason to
avoid them. Most SSD don't handle writes fast or don't last very long
when flooded with them.

>>>
>>> You can also read up on : http://wiki.squid-cache.org/SquidFaq/RAID
>>>
>>> Cheers,
>>>
>>> Pieter
>> Hi Pieter. Thanks for your help !!
>>
>> You say something like this?
>>
>> cache_dir aufs / disk1/squid-cache/squid 100000 64 256
>> cache_dir aufs / disk2/squid-cache/squid 100000 64 256
>> cache_dir aufs / disk3/squid-cache/squid 100000 64 256
>>
>> I should add something more to balance the load?

Default balancing is to save new items to the dir with most free space.
So in setups like this it is pretty optimal.

If you want to change that there is also a round-robin selection based
on object count rather than size.
http://www.squid-cache.org/Doc/config/store_dir_select_algorithm/

If you have squid-2.7 throw COSS in as well for small objects (<128K).
That is a disk-backed RAM cache optimized for Squids needs. The disk
backed area can share a disk with an aufs directory, and speeds up the
common small object performance a huge amount.

Above and beyond everything. The RPM speed matters most for quick I/O op
turnover. Go for higher numbers there.

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.14
   Beta testers wanted for 3.2.0.10
Received on Sat Aug 06 2011 - 02:05:04 MDT

This archive was generated by hypermail 2.2.0 : Sat Aug 06 2011 - 12:00:01 MDT