Re: [squid-users] Re: Still having some slowness

From: Scott Mayo <scotgmayo_at_gmail.com>
Date: Sat, 15 Feb 2014 07:11:39 -0600

On Sat, Feb 15, 2014 at 6:12 AM, Amos Jeffries <squid3_at_treenet.co.nz> wrote:
> On 15/02/2014 6:54 a.m., Scott Mayo wrote:
>> On Fri, Feb 14, 2014 at 11:34 AM, Scott Mayo wrote:
>>> On Fri, Feb 14, 2014 at 10:32 AM, Scott Mayo wrote:
>>>> On Fri, Feb 14, 2014 at 10:10 AM, babajaga wrote:
> <snip>
>>> ------------------------------------
>>> Assuming, you are logged in as root, the simplest is to edit
>>> /etc/init.d/squid and insert
>>>
>>> ulimit -n 4096
>>>
>>> before the actual start comd for squid.
>>>
>>> Then restart squid, and the new limit should be effective.
>>>
>>> This also will be a permanent solution, surviving a new boot.
>>> -------------------------------------------------------
>>>
>>> Just got that response, but had arleady edited the limits.conf file
>>> and set the descriptoers to 8192 and restarted squid and now I am
>>> showing:
>>>
>>> Maximum number of file desciprtors: 8192
>>> Available number of file descriptors: 7958
>>> Reserved number of file descriptors: 100
>>>
>>> Hopefully that will take care of that error and I will go from there.
>>>
>>> Thanks.
>>> Scott
>>
>> Interesting. After making that change, I now have one of the CPUs
>> that uses about 60% constantly. It switches CPUs some and sometimes
>> splits the 60% between a couple of them. Also using about another 1GB
>> of memory.
>>
>> I may cut the 8192 back to 4096 and see what happens. Going to watch
>> it for a while this way though to see if the error has completely gone
>> away.
>>
>
>
> It may be the fact you changed limits.conf. Which is global across that
> machine. The extra CPU could be coming from anywhere in the system.
>
> The ulimit -n method recommended only alters the defaults for Squid in
> a much more targeted way.
>
> Amos

AFter a couple of minutes, it all went back to normal. Was kind of strange.

So doing it the other way will let me set FDs higher in squid than
what the machine actually has set?

I just assumed if the limits.conf was set to a certain amount that
squid or nothing else could actually go over that amount.

-- 
Scott Mayo
Received on Sat Feb 15 2014 - 13:11:48 MST

This archive was generated by hypermail 2.2.0 : Sat Feb 15 2014 - 12:00:05 MST