Re: [squid-users] Squid tuning

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Tue, 30 Mar 2004 21:31:31 +0200 (CEST)

On Tue, 30 Mar 2004, Gaetano Mendola wrote:

>> This is a huge number of filedescriptors.. you will get better
>> performance if the number of filedescriptors is in balance with the
>> numberof concurrent users you have..
>
> May this huge ammount of filedescriptors compromise the performances ?

As I said, you will get better performance with the number of
filedescriptors in balance with the number of users you have.

But with only 300 users performance should not really be an issue to even
concider.

> I have already the machine :-) If I use the aufs cache_dir the dual
> processor is still useless ?

Not useless, but it can not be used to full.

> |>I have about 300 clients connected at the same time.
>
> I mean client not connection, the situation rigth now is:

> Cache information for squid:
> ~ Request Hit Ratios: 5min: 29.7%, 60min: 27.4%
> ~ Byte Hit Ratios: 5min: 8.8%, 60min: 10.3%
> ~ Request Memory Hit Ratios: 5min: 5.4%, 60min: 6.9%
> ~ Request Disk Hit Ratios: 5min: 46.7%, 60min: 47.6%
> ~ Storage Swap size: 8368184 KB
> ~ Storage Mem size: 71376 KB
> ~ Mean Object Size: 14.09 KB
> ~ Requests given to unlinkd: 0
> Median Service Times (seconds) 5 min 60 min:
> ~ HTTP Requests (All): 0.23230 0.23230
> ~ Cache Misses: 0.33943 0.33943
> ~ Cache Hits: 0.01745 0.01745
> ~ Near Hits: 0.33943 0.20843
> ~ Not-Modified Replies: 0.01035 0.01035
> ~ DNS Lookups: 0.01046 0.01046
> ~ ICP Queries: 0.00000 0.00000

Looking pretty good so far.

> Resource usage for squid:
> ~ UP Time: 41981.827 seconds
> ~ CPU Time: 35093.990 seconds
> ~ CPU Usage: 83.59%
> ~ CPU Usage, 5 minute avg: 96.12%
> ~ CPU Usage, 60 minute avg: 96.14%

A little high. Possibly partially due to the very high number of
filedescriptors.

> Memory usage for squid via mallinfo():
> ~ Total space in arena: 233249 KB
> ~ Ordinary blocks: 170728 KB 109083 blks
> ~ Small blocks: 0 KB 0 blks
> ~ Holding blocks: 4424 KB 4 blks
> ~ Free Small blocks: 0 KB
> ~ Free Ordinary blocks: 62521 KB
> ~ Total in use: 175152 KB 74%
> ~ Total free: 62521 KB 26%
> ~ Total size: 237673 KB

Looks good.

> Memory accounted for:
> ~ Total accounted: 146350 KB
> ~ memPoolAlloc calls: 452150294
> ~ memPoolFree calls: 450218028

> File descriptor usage for squid:
> ~ Maximum number of file descriptors: 16384
> ~ Largest file desc currently in use: 2458
> ~ Number of file desc currently in use: 2098
> ~ Files queued for open: 0
> ~ Available number of file descriptors: 14286
> ~ Reserved number of file descriptors: 100
> ~ Store Disk files open: 88

As you can see here you have a huge amount of unused filedescriptors.

> I'm scared about my disk io performances, suggestion on which quantity
> look at it ? I will try what iozone reveil.

Right, disk I/O is a major performance bottleneck for Squid. Not very
much software tuning in Squid other than to enable aufs and the tuning
knobs is mostly found outside of Squid

  1. Number of drives used for cache

  2. Type of filesystem used.

  3. noatime and similar mount flags

  4. make sure the L1 parameter in cache_dir is sufficiently large for
your cache size.

Regards
Henrik
Received on Tue Mar 30 2004 - 12:31:34 MST

This archive was generated by hypermail pre-2.1.9 : Thu Apr 01 2004 - 12:00:03 MST