poll vs epoll performance
Brad Fitzpatrick
brad@danga.com
Mon, 17 Nov 2003 10:05:16 -0800 (PST)
How fast can you ping a host on a 100Mbit lan? 0.1 ms.
What's 400 * 0.1ms? About a half second.
You're wasting all your time sending packets around. Like Avva said, use
get_multi, or switch to a gigabit network, or both. Using epoll may help
a tad, but that's not your current problem.
- Brad
On Sun, 16 Nov 2003, Richard Jones wrote:
> Hi all,
> we're running memcached on a couple of xeon boxes, using poll on both, epoll
> isnt installed
>
> i noticed one php page making around 400 induvidual GET requests to memcached,
> total memcached time take was 0.5 seconds. all requests were cache hits.
>
> how many memcached requests might a typical LJ/slashdot/any webpage make, and
> how long does it take to process them all? I'm interested in ways to reduce
> that 0.5 seconds
>
> each request was fetching a fairly small php object. (100mbit lan) i'd like to
> know if this is par for the course, or would the time taken decrease a lot if
> we were using epoll?
>
> what about using get_multi so all keys are passed in an array, this shouldnt
> make any speed difference, because the socket connection is already open so
> it is not cutting down on any connection overhead..right?
>
> Thanks,
> Richard.
>
>
>