Re: [squid-users] Squid limits and hardware spec

From: Martin Marji Cermak <mc1@dont-contact.us>
Date: Mon, 29 Nov 2004 11:32:03 +0800

Hello guys,
I have been playing with Squid under a heavy load and there are some stats.
I am trying to maximise the "Byte Hit Ratio" value. I got 13% average,
but I am not happy about this number - I want it higher (how to do it?).
There are thousands of ADSL clients using the cache and I want to know
what the Squid limits are.

USED HARDWARE:
Processor: P4 1.8GHz
Memory: 1 GB
Hardisk: 40 GB IDE 7200rpm
Controler: Serverworks Chipset
Ethernet card: Broadcom TG3

ACHIEVED PERFORMANCE:
Requests: 180 req/sec (peak), 60 req/sec (day average).
Server In: 1400 kBytes/sec (peak), 600 kBytes/sec (day average)
Request Hit Ratio: 37% day average
Byte Hit Ratio: 13% (TOO LOW !!!)
Average service time:
  - Cache Hits: 0.01 sec
  - Cache Miss: 0.5 sec
Mem Usage: 120 MBytes
CPU Usage: 50% (server is dedicated to Squid)
Server LOAD (gathered from uptime): 2.5 average, 3.7 peak
   (I saved some load by switching klogd off)

USED CONFIGURATION:
maximum_object_size 51200 KB (SHOULD I MAKE IT HIGHER ???)
cache_dir aufs /cache 25000 16 256
   (one ide disk, see the spec above)
cache_mem 8 MB

The Squid is configured as a transparet proxy, so:
httpd_accel_uses_host_header on
httpd_accel_with_proxy OFF (yes, transparent)
httpd_accel_port 80
httpd_accel_host virtual

Tell me if you are interested in other settings.

The bottleneck of the system is the disk at the moment, because it is
only IDE. The average system load is 2.5, when I route more users to the
cache, load goes up close to 4 and the Cache Miss response time goes to
1 sec.

Under this load, you cannot do anything else, e.g. gzip logfiles - it
affects the actual Squid performance.
I noticed the klogd took 30% of CPU in peaks, because of the TPROXY
module which logs a lot. I had the debug info switched off by a
syslog.conf rule, so is was not being logged, but the module kept
sending log messages to the log daemon so klogd took 30% of CPU anyway.
I switched the klogd off and the performance change was visible.

I am going to install a new box with SCSI disks so I will report to you
how the performance will change.

Any ideas how to get higher Byte Hit Ratio from actual 13 % ?

Have a nice week, Marji

Martin Marji Cermak wrote:
> Hello Guys,
> I am going to run a Squid box for a lot of users.
> I want to handle as much users as possible (thousands - I work for a
> small ISP).
>
> Unfortunately, I am not sure what the Squid limits are and my boss asked
> me to specify the hardware I wanted him to buy.
>
>
> Please, answer my folowing questions:
>
> 1) What are the Sqids's limits?
> (I got to 100 client HTTP request/seconds so far)
>
> 2) What hardware would you recommend for its maximal performance?
> I am going to dedicate a Debian linux box for Squid, there will be no
> other services.
>
> 3) What maximum_object_size whould you use, considering I want to save
> as much bandwidth as possible?
> (I have : "maximum_object_size 51200 KB" at the moment,
> together with : "cache_dir aufs /cache 25000 16 256"
> and I got close to 15% Byte Hit Ratio)
>
>
> Thank you, guys,
> Marji
Received on Sun Nov 28 2004 - 20:31:22 MST

This archive was generated by hypermail pre-2.1.9 : Wed Dec 01 2004 - 12:00:02 MST