On 24/08/11 21:46, viswanathan sekar wrote:
Hi All,
I had an argument with my friends telling them that mulitple squid
instances in multi-core processors will give better performance with
iptables load balancing.
Some of my friends disagreed with me telling single squid instance
will give same performance.
I am really confused,
which will give better performacne from the above two?
Is squid IO bound or CPU bound ?
Both.
- instances using cache_dir tend to be disk I/O bound
- instances using only memory caching tend to be network I/O bound
- instances doing much ACL filtering tend to be CPU bound
With >2 cores you can mix these types to get better overall performance
in one area or another.
As for iptables;
So far I have had two people indicating a nice req/sec increase using:
a single instance, single core utilized, identical config, only changing
2 vs 1 http_port receiving traffic. We don't know why precisely, I do
know that two ports means Squid does two accept() per cycle of FD checking.
(I forget what the actual increase % mentioned was, no strict
measurements were taken though).
NOTE: iptables is just a way of presenting client with one port and
using this effect for two ports in the background. Same effect was seen
with other non-iptables methods of spreading the load over two ports
(round-robin DNS in the one case of that. I expect PAC selection of an
instance port would work too).
Nice project in there if someone wants to research its reliability
and measure the actual gain/loss metrics.
NP: Squid makes _extreme_ demands of the disks. If there is anything
getting in between or trying to utilize them for other purposes
(including RAID) the disk I/O performance is degraded. Sometimes a lot.
Amos
--
Please be using
Current Stable Squid 2.7.STABLE9 or 3.1.14
Beta testers wanted for 3.2.0.10