epoll() vs poll()

SERVER A:

Cpu(s):  7.3% us,  5.6% sy,  0.0% ni, 81.5% id,  0.0% wa,  5.6% hi,  0.0% si

SERVER B:

CPU states:  cpu    user    nice  system    irq  softirq  iowait    idle
            total    5.8%    0.0%   71.5%   1.9%     9.8%    0.0%   10.7%

SERVER A is one of our newer POP3/IMAP proxy servers, running Red Hat ES4 (2.6.9 kernel) with Dovecot compiled to use epoll() to handle network events.  SERVER B is one of our older POP3/IMAP proxy servers, running Red Hat ES3 (2.4.21 kernel) with Dovecot complied to use poll() to handle network events.

Each server is handling an equal number of POP3, POP3, IMAP and IMAPS connections.  Several thousand connections total.  Dovecot is handling all of the connections using one process per port, so 4 processes total.

Notice that SERVER A is mostly idle, while SERVER B is using 71.5% of the CPU to handle system events.  Click on the epoll() and poll() links above to understand why this occurs, and why we are in the process of replacing all of our proxy servers with ES4 + epoll().

Leave a Reply

Your email address will not be published.