Re: [squid-users] Squid tuning

From: Gaetano Mendola <mendola@dont-contact.us>
Date: Tue, 30 Mar 2004 19:45:08 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Henrik Nordstrom wrote:

| On Tue, 30 Mar 2004, Gaetano Mendola wrote:
|
|
|>-----BEGIN PGP SIGNED MESSAGE-----
|>Hash: SHA1
|>
|>Hi all,
|>I'm running squid 2.5 STABLE 4:
|>
|>Squid Cache: Version 2.5.STABLE4
|>configure options: --prefix=/usr/local/squid-tuned2
|>- --exec-prefix=/usr/local/squid-tuned2 --enable-snmp
|>- --enable-useragent-log --enable-referer-log --enable-delay-pools
|>- --enable-ssl --enable-storeio=diskd,aufs,ufs --with-pthreads
|>- --enable-async-io=24 --enable-kill-parent-hack
|
|
| Are you absolutely sure you want the kill-parent-hack option?

I took these settings from a mailing list, so I even don't know what it
was. I google it and I found that I don't need it :-)

|>and before to compile it I did:
|>
|>ulimit -HSn 16384
|>export CFLAGS="-O6 -s -DNUMTHREADS=24"
|
|
| 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 ?

|>the box is a dual PIII with 1GB RAM
|
|
| SMP is a waste for Squid. Better with two smaller UP boxes (and often
| costs about the same..)

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

|>maximum_object_size_in_memory 16 KB
|>cache_dir aufs /opt/squid/cache 10000 22 256
|
|
| With 1GB of memory you have memory to sustain bigger caches..

What about:

cache_mem 70 MB
maximum_object_size_in_memory 256 KB
cache_dir aufs /opt/squid/cache 10000 22 256

|>pipeline_prefetch on
|
|
| This you do not want if you are looking for good performance.
|
| You'd also want to turn off half_closed_clients

Ok I will use then:

pipeline_prefetch off
half_closed_clients off

|>I have about 300 clients connected at the same time.

I mean client not connection, the situation rigth now is:

Connection information for squid:
~ Number of clients accessing cache: 1124
~ Number of HTTP requests received: 3238133
~ Number of ICP messages received: 0
~ Number of ICP messages sent: 0
~ Number of queued ICP replies: 0
~ Request failure ratio: 0.00
~ Average HTTP requests per minute since start: 4627.9
~ Average ICP messages per minute since start: 0.0
~ Select loop called: 9203784 times, 4.561 ms avg
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
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%
~ Process Data Segment Size via sbrk(): 233249 KB
~ Maximum Resident Size: 0 KB
~ Page faults with physical i/o: 704
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
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
Internal Data Structures:
~ 594272 StoreEntries
~ 5489 StoreEntries with MemObjects
~ 5093 Hot Object Cache Items
~ 593723 on-disk objects

| Not many at all.. you should not need to make any tuning of your Squid.

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

Thank you

Regards
Gaetano Mendola

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAabIh7UpzwH2SGd4RAk0mAJ4nvb/xnLhVobsbapQn1ziYf7k++ACbB2lb
DwXgOWKhoNsehUpjus+G2aY=
=/etU
-----END PGP SIGNATURE-----
Received on Tue Mar 30 2004 - 10:45:19 MST

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