… | |
… | |
959 | can never compete with an event loop that uses epoll when the number of |
959 | can never compete with an event loop that uses epoll when the number of |
960 | file descriptors grows high. In this benchmark, all events become ready at |
960 | file descriptors grows high. In this benchmark, all events become ready at |
961 | the same time, so select/poll-based implementations get an unnatural speed |
961 | the same time, so select/poll-based implementations get an unnatural speed |
962 | boost. |
962 | boost. |
963 | |
963 | |
|
|
964 | Also, note that the number of watchers usually has a nonlinear effect on |
|
|
965 | overall speed, that is, creating twice as many watchers doesn't take twice |
|
|
966 | the time - usually it takes longer. This puts event loops tested with a |
|
|
967 | higher number of watchers at a disadvantage. |
|
|
968 | |
964 | C<EV> is the sole leader regarding speed and memory use, which are both |
969 | C<EV> is the sole leader regarding speed and memory use, which are both |
965 | maximal/minimal, respectively. Even when going through AnyEvent, it uses |
970 | maximal/minimal, respectively. Even when going through AnyEvent, it uses |
966 | far less memory than any other event loop and is still faster than Event |
971 | far less memory than any other event loop and is still faster than Event |
967 | natively. |
972 | natively. |
968 | |
973 | |
… | |
… | |
1043 | distribution. |
1048 | distribution. |
1044 | |
1049 | |
1045 | =head3 Explanation of the columns |
1050 | =head3 Explanation of the columns |
1046 | |
1051 | |
1047 | I<sockets> is the number of sockets, and twice the number of "servers" (as |
1052 | I<sockets> is the number of sockets, and twice the number of "servers" (as |
1048 | eahc server has a read and write socket end). |
1053 | each server has a read and write socket end). |
1049 | |
1054 | |
1050 | I<create> is the time it takes to create a socketpair (which is |
1055 | I<create> is the time it takes to create a socketpair (which is |
1051 | nontrivial) and two watchers: an I/O watcher and a timeout watcher. |
1056 | nontrivial) and two watchers: an I/O watcher and a timeout watcher. |
1052 | |
1057 | |
1053 | I<request>, the most important value, is the time it takes to handle a |
1058 | I<request>, the most important value, is the time it takes to handle a |
1054 | single "request", that is, reading the token from the pipe and forwarding |
1059 | single "request", that is, reading the token from the pipe and forwarding |
1055 | it to another server. This includes deleteing the old timeout and creating |
1060 | it to another server. This includes deleting the old timeout and creating |
1056 | a new one with a later timeout. |
1061 | a new one that moves the timeout into the future. |
1057 | |
1062 | |
1058 | =head3 Results |
1063 | =head3 Results |
1059 | |
1064 | |
1060 | name sockets create request |
1065 | name sockets create request |
1061 | EV 20000 69.01 11.16 |
1066 | EV 20000 69.01 11.16 |