Re: squid benchmarking results - squid-3.0 + epoll()

From: Gonzalo Arana <garana@dont-contact.us>
Date: Thu, 9 Dec 2004 11:52:13 -0300

Hi Muthukumar,

On Thu, Dec 09, 2004 at 11:49:35AM +0530, Muthukumar wrote:
>
> hai gonzalo arana,
>
> thanks for detailed reply.
>
> > Looks like you are running into a CPU bottleneck. Perhaps you may want
> > to add --enable-cpu-profiling to configure, and check cpu usage data
> > with cache manager, or compile and link with -pg and check results with
> > gprof.
>
> I have done configuration with --enable-cpu-profiling and monitoring with cachemgr.cgi script.
>

Could you send the results? It shouln't be too hard to tell
if squid3 can be optimized some way to enhance the number of requests
per second.

>
> > Also, verify whether CPU usage is in kernel-mode or user-mode with vmstat
> > during the test (sar gives this information as well).
>
> vmstat result when squid is running at peak load ( 180 req / sec ),
>
> procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
> r b swpd free buff cache si so bi bo in cs us sy id wa
> 1 0 0 119024 34116 61252 0 0 0 110 11035 79 69 31 0 0
> 1 0 0 99464 34144 61256 0 0 0 148 13033 26 65 35 0 0

cpu usage is mostly user-mode, so --enable-cpu-profiling/-pg results should
be meaningful.

>
> >
> > Looks like you are running with (the same?) CPU bottleneck.
> >
> > [snip]
> >
>
> I did not get this. How to measure throughput (in bps)?

In linux, I prefer to use iptables. ifconfig provides some numbers, but
some processing is needed. I was curious about throughput on epoll vs
poll/select. Never mind.

>
> >
> >> 008.75| Connection.cc:485: error: 1/1 (s110) Connection timed out
> >> 008.75| error: raw write after connect failed
> >> after these req / sec configuration setting.
> >
> > Try enabling SYN cookies, and running squid with ulimit -HSn 131072.
>
> I have tuned sysctl -w net.ipv4.tcp_syncookies=1, ulimit -HSn there. But I am getting same error reply as,
> Connection.cc:485: error: 1/1 (s110) Connection timed out

This may be caused by some resource exaustion (probably file
descritors). You may use cache_mgr to find out what's the
problem here (dmesg may give some useful tips as well).

> can we get more req / sec satisfacation for 512 MB RAM, 927.753 MHz cpu (pIIII) ??

Hard to tell. With cache manager CPU usage information, I could try to
give you an answer. Any way, you are getting time outs when connecting
to squid, so there might be another problem which is limiting your squid
response rate (such as fd exaustion).

> I am using /dev/null file system for benchmarking?

Sounds like the right choice for testing/benchmarking squid's network
code.

>
> Do you have benchmarking any results for squid?

No, I'm sorry. I've just limited my self to use squid3 with epoll, and
CPU savings is great in real life situations, where the number of idle
connections per squid main loop is large (due to network delays and
user's click interval).

I assume your test scenario have a really low delay between client(s)
and squid, and between squid and web server(s). In this
context, I guess epoll, or kevent/kqueue can only give you a little
improvement in the number of concurrent connections.

>
> regards
> muthukumar

Regards,

Gonzalo
Received on Thu Dec 09 2004 - 04:54:17 MST

This archive was generated by hypermail pre-2.1.9 : Fri Dec 31 2004 - 12:00:04 MST