Re: [squid-users] delays in squid.

From: Tek Bahadur Limbu <[email protected]>
Date: Mon, 01 Oct 2007 21:51:32 +0545

Hi Azfar Hashmi,

Azfar Hashmi wrote:
> ###########################
> squidclient mgr:info
> #######################
> HTTP/1.0 200 OK
> Server: squid/2.6.STABLE12
> Date: Sat, 29 Sep 2007 08:27:35 GMT
> Content-Type: text/plain
> Expires: Sat, 29 Sep 2007 08:27:35 GMT
> Last-Modified: Sat, 29 Sep 2007 08:27:35 GMT
> X-Cache: MISS from proxy.eworld.net.pk
> X-Cache-Lookup: MISS from proxy.eworld.net.pk:3128
> Via: 1.0 proxy.eworld.net.pk:3128 (squid/2.6.STABLE12)
> Proxy-Connection: close
>
> Squid Object Cache: Version 2.6.STABLE12
> Start Time: Thu, 27 Sep 2007 07:43:03 GMT
> Current Time: Sat, 29 Sep 2007 08:27:35 GMT
> Connection information for squid:
> Number of clients accessing cache: 1
> Number of HTTP requests received: 922891
> Number of ICP messages received: 0

Even though your Squid process is running for 2 days, there seems to be
hardly any activity.

Where are your users? Is this a parent proxy server? There is hardly any
traffic.
I guess this is the result while your proxy was under little load
(probably in the wee hours).

> Number of ICP messages sent: 0
> Number of queued ICP replies: 0
> Number of HTCP messages received: 0
> Number of HTCP messages sent: 0
> Request failure ratio: 0.00
> Average HTTP requests per minute since start: 315.6

Ok HTTP average shows an average activity of approximately 6
requests/second.

> Average ICP messages per minute since start: 0.0
> Select loop called: 79249222 times, 2.214 ms avg
> Cache information for squid:
> Request Hit Ratios: 5min: 0.0%, 60min: 0.0%
> Byte Hit Ratios: 5min: -0.0%, 60min: -0.0%
> Request Memory Hit Ratios: 5min: 0.0%, 60min: 0.0%
> Request Disk Hit Ratios: 5min: 0.0%, 60min: 0.0%

Your proxy is not caching anything at all!! No wonder your Squid seems
slow to you. It is probably fetching every requests directly from the
requested web servers!

> Storage Swap size: 1938180 KB
> Storage Mem size: 130292 KB
> Mean Object Size: 15.32 KB
> Requests given to unlinkd: 0
> Median Service Times (seconds) 5 min 60 min:
> HTTP Requests (All): 0.00000 0.00000
> Cache Misses: 0.00000 0.00000
> Cache Hits: 0.00000 0.00000
> Near Hits: 0.00000 0.00000
> Not-Modified Replies: 0.00000 0.00000
> DNS Lookups: 0.00000 0.00000
> ICP Queries: 0.00000 0.00000

No median average service time. This won't be of much help if your
problem could be related either to cache configuration or DNS issues, etc..

> Resource usage for squid:
> UP Time: 175471.316 seconds
> CPU Time: 610.098 seconds
> CPU Usage: 0.35%
> CPU Usage, 5 minute avg: 0.00%
> CPU Usage, 60 minute avg: 0.00%
> Process Data Segment Size via sbrk(): 178100 KB
> Maximum Resident Size: 0 KB
> Page faults with physical i/o: 1

Hardly any CPU cycles are in use. Are you sure that your 250 users are
actually using your proxy server at all? By way, are you running a
transparent or just a normal forward proxy?

How does your network topology look like?

> Memory usage for squid via mallinfo():
> Total space in arena: 178100 KB
> Ordinary blocks: 176144 KB 188 blks
> Small blocks: 0 KB 0 blks
> Holding blocks: 15624 KB 3 blks
> Free Small blocks: 0 KB
> Free Ordinary blocks: 1955 KB
> Total in use: 191768 KB 99%
> Total free: 1955 KB 1%
> Total size: 193724 KB
> Memory accounted for:
> Total accounted: 164076 KB
> memPoolAlloc calls: 119417680
> memPoolFree calls: 118542404

Don't see any problem with your Squid's memory usage.

> File descriptor usage for squid:
> Maximum number of file descriptors: 65535
> Largest file desc currently in use: 14
> Number of file desc currently in use: 12
> Files queued for open: 0
> Available number of file descriptors: 65523
> Reserved number of file descriptors: 100
> Store Disk files open: 0
> IO loop method: epoll

So you have a Linux based machine. Your file descriptors is way too
high. It's quite unnecessary and may even prove to bottleneck too.

With 8192 file descriptors, a Squid box can easily serve 2000 - 6000 users.

For 250 users, I would probably use 2048 or 4096 file descriptors.

> Internal Data Structures:
> 127459 StoreEntries
> 21644 StoreEntries with MemObjects
> 21643 Hot Object Cache Items
> 126496 on-disk objects

Your store entires seem quite small. Maybe that explains why you have a
hit ratios of 0.00000!

>
> ##############################
> squidclient mgr:5min | grep client
> ################################
> client_http.requests = 0.003333/sec
> client_http.hits = 0.000000/sec
> client_http.errors = 0.000000/sec
> client_http.kbytes_in = 0.000000/sec
> client_http.kbytes_out = 0.010000/sec
> client_http.all_median_svc_time = 0.000000 seconds
> client_http.miss_median_svc_time = 0.000000 seconds
> client_http.nm_median_svc_time = 0.000000 seconds
> client_http.nh_median_svc_time = 0.000000 seconds
> client_http.hit_median_svc_time = 0.000000 seconds
>

Still can't see any users using your proxy server. Can you actually post
the results while your Squid box is running in your peak hour?

Also posting your squid.conf might help.

Thanking you...

> On 9/27/07, Tek Bahadur Limbu <teklimbu@wlink.com.np> wrote:
>> Hi Azfar Hashmi,
>>
>>
>> Azfar Hashmi wrote:
>>> I am running squid on a 3ghz p4 processor with 1gb ddr ram. My max
>>> simaltanous users are 250 and average 100. I have a 3.5mb circuit on
>>> it. I have a 160GB SATAII harddrive on it.
>>> My problem is i am getting huge delay with squid (5-10sec in each
>>> request and some times more) on peak hours but if i bypass the squid
>>> every thing is perfect and page complete in just 1 sec normaly.
>>
>> For a bandwidth pipe of 3.5 mbps, your Squid box should be able to
>> support 250 users. By which means do you get you bandwidth?
>>
>> Do you have large ACLs used for filtering in your Squid box? If yes,
>> then the problem of the huge delay could be attributed to your ACLs.
>>
>> Posting your squid.conf might help? Which OS, firewall and version of
>> Squid are you using?
>>
>> DNS could also be the culprit. Are you running a local caching nameserver?
>>
>>
>>> I have defined 20GB in cache_dir.
>>>
>>> I want to know with that hardware how many users squid can handle and
>>> how much bandwidth it can handle?
>> Can you post us the output of the following 2 commands:
>>
>> squidclient mgr:info
>>
>> and
>>
>> squidclient mgr:5min | grep client
>>
>>
>> Thanking you...
>>
>>
>>
>>>
>>>
>>
>> --
>>
>> With best regards and good wishes,
>>
>> Yours sincerely,
>>
>> Tek Bahadur Limbu
>>
>> System Administrator
>>
>> (TAG/TDG Group)
>> Jwl Systems Department
>>
>> Worldlink Communications Pvt. Ltd.
>>
>> Jawalakhel, Nepal
>>
>> http://www.wlink.com.np
>>
>
>
>

-- 
With best regards and good wishes,
Yours sincerely,
Tek Bahadur Limbu
System Administrator
(TAG/TDG Group)
Jwl Systems Department
Worldlink Communications Pvt. Ltd.
Jawalakhel, Nepal
http://www.wlink.com.np
Received on Mon Oct 01 2007 - 10:07:15 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Nov 01 2007 - 13:00:00 MDT