Re: [squid-users] Cache_dir size considerations

From: Marcello Romani <mromani_at_ottotecnica.com>
Date: Fri, 19 Mar 2010 16:44:18 +0100

GIGO . ha scritto:
> Well i want to make sure that my settings are optimized and want to
> learn more about the cache_dir settings.....let me come in details

Gigo,
     you are asking a lot of questions all at once.
This is a volounteer-based support list, so your chances of getting
(good) responses are maximized if you ask specific questions, one or two
per post (possibly related).

That said, I'll try to answer with what I know...

>
>
> I have installed squid3stable24 on Ubuntu 8.04 on IBM 3650 X series
> server with two hard disks on which physical RAID1 is implemented. I
> am to use the Squid Server for 1000 users out of which 250 are power
> usrs rest of them are normal users for which there are many
> restrictions(youtube,facebook,msnmessgenger,yahoomessenger,mp3mpg
> etc...).

OK

>
> I have done my settings specifically to ensure that windows updates
> are cached and my maximum_object_size is 256 mb. Also i am looking
> forward to cache Youtube content(for which i have no updated script
> and settings so far the one on internet is with storeurl directive
> which is depricated).......
>
>
> Now my cache directory size is 50 gb with 16 L1 and 256 L2. I think
> better would be
>
> Cache_dir_size aufs 50 GB 48(L1) 768(L2)
>
>
> as far as L1 & L2 settings i am clear that there should be no more
> than around 100 file in L2 directories so one's settings should be
> adjusted accordingly. However i am confused that if setting your
> cache (50gb) of too large a size will have anything to do with your
> performance. Secondly at the moment the cache directory is
> implemented on the same hard drive on which OS is installed. I know
> that cache should be better moved to a spare hard drive. But what
> about the highavailability? Failure of a disk cud result in the
> failure of proxy?

To maximize performance you want 1 disk for OS and logs, and one disk
per cache_dir, without any RAID.
With only two disks, obviously if either one dies you have an out of
service.
So to achieve ha squid you'd neeto to have two phisical squid boxes, I
think. Haven't tried myself, so i cannot guide you on how to set that up...

>
> Another confusion which i have is that what about the
> cahe_effective_user i hav set my user
>
> cache_effective_user proxy but i dont have much concepts about it. I
> have read on SAN institute site a white paper published 2003 that
> squid should not be run as nobody user but as a sandbox user with
> noshell. However i am not sure what is it all about and whether this
> informaiton is still valid after 7 years have been passed.

Squid should not be run as root.
You should have a dedicated user account for it.
Squid cache dirs should be rw by that squid account, obviously.
I belive most distros (at least server-oriented ones) take care of this
setup when you install squid via package manager.

>
> Please also guide me that what are the risks involved with this
> setting which i have done for windows update:
>
> range_offset_limit -1 maximum_object_size 256 MB quick_abort_min -1

No risk, but if a user interrupts a huge download, squid will continue
it until it finishes, possibly wasting a lot of bandwidth on the wan side.

>
>
> Further after giving squid too many longs list of blocked site say
> containg 100+ sites. I have noticed that its slowed down however i am
> not sure that if it is the reason? please guide......
>

Well, blocking sites involves checking every request's url against all
the sites in the blacklist. This might have a noticeable impact on the
server load. Also, if you have many regexes in the blacklist(s) the load
will be significantly higher.
You might want to have a look at squidGuard or other external helper, to
take advantage of the multiple CPU cores your server might have.

>
> Please guide in detail it will be really beneficial for me as concept
> building...i would be really thankful..
>
> regards,
>
>

HTH

>
>
>
>
> ----------------------------------------
>> Date: Wed, 17 Mar 2010 11:00:22 +0100 From: mromani_at_ottotecnica.com
>> CC: squid-users_at_squid-cache.org Subject: Re: [squid-users]
>> Cache_dir size considerations
>>
>> GIGO . ha scritto:
>>> The total amount of Ram on the server is 4 GB with cache_mem
>>> parameter set to 1 GB.
>>>
>> IMHO there's plenty of HW for squid to run smoothly. But it also
>> depends on the amount of traffic.
>>
>> I'm sorry but I think I don't get your point... what is exactly the
>> problem you're having ?
>>
>> -- Marcello Romani
> _________________________________________________________________
> Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
> https://signup.live.com/signup.aspx?id=60969

-- 
Marcello Romani
Received on Fri Mar 19 2010 - 15:44:20 MDT

This archive was generated by hypermail 2.2.0 : Fri Mar 19 2010 - 12:00:05 MDT