epoll && linux 2.6
Poul-Henning Kamp
phk at phk.freebsd.dk
Tue Jan 27 22:59:17 CET 2009
In message <497F82C5.7080407 at yandex-team.ru>, Iliya Sharov writes:
>Hello,
>
>I have varnishd 2.0.1 in Debian Etch (2.6.22, 2.6.26 kernel)
>I'm very strange, it doesn't useing epoll.
>That's the output of my configure and strace:
>
>checking for epoll_ctl... yes
>checking for poll... yes
>
>writev(14, [{"200 19 \n", 13}, {"PONG 1233093165 1.0", 19}, {"\n", 1}], 3) = 33
>poll([{fd=11, events=POLLIN, revents=POLLIN}], 1, -1) = 1
>read(11, "ping\n", 8191)
There are a number of places in varnish where we need to wait for
a single or a couple of filedescriptors, a task poll(2) is perfectly
capable of handling.
The CLI communication is one of them, as shown in your trace.
The place we attempt to use kqueue or epoll is for monitoring
idle client connections for new requests, because of the
sheer number of filedescriptors, select or poll would take
a significant performance hit.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the varnish-misc
mailing list