epoll on squid

From: David Nicklay <dnicklay@dont-contact.us>
Date: 18 Dec 2002 16:31:36 -0500

Okay I pushed two instances of squid running on a box with 2 1.4GHz
Pentium IIIs to a total of about 2833 requests/second in live traffic
with sub 50 millisecond response times. The instances were setup as
reverse proxy under squid-3.0-DEVEL w/ epoll, linux kernel 2.5.52,
gcc3.2, glibc-2.2.5 on a gentoo i686 built system. At around 2900
requests/second I run out of CPU idle time and the response time backs
up.

I had one very glaring problem with the test. It appears that my file
handles are not closing, even after I remove traffic for a while. I am
guessing I am going to have to implement something in comm_epoll to
handle file closes. That is probably where the performance drain is at
the moment. See what I mean:

<test /usr/src/epoll/squid3/squid-3.0-DEVEL-20021126/src> # cat
/proc/sys/fs/file-nr
82302 1062 131072
<test /usr/src/epoll/squid3/squid-3.0-DEVEL-20021126/src> # cat
/proc/net/sockstat
sockets: used 80983
TCP: inuse 81015 orphan 45 tw 6 alloc 81015 mem 643
UDP: inuse 4
RAW: inuse 0
FRAG: inuse 0 memory 0

At 2833 requests/second I should be seeing something under 20000 TCP
sockets in use. I am certain that the extra 60k of sockets were not
helping my CPU idle time any.

-- 
David Nicklay
Location: CNN Center - SE0811A
Office: 404-827-2698	Cell: 404-545-6218
Received on Wed Dec 18 2002 - 14:32:17 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:19:01 MST