… | |
… | |
1035 | timeout is reset each time something is read because that reflects how |
1035 | timeout is reset each time something is read because that reflects how |
1036 | most timeouts work (and puts extra pressure on the event loops). |
1036 | most timeouts work (and puts extra pressure on the event loops). |
1037 | |
1037 | |
1038 | In this benchmark, we use 10000 socketpairs (20000 sockets), of which 100 |
1038 | In this benchmark, we use 10000 socketpairs (20000 sockets), of which 100 |
1039 | (1%) are active. This mirrors the activity of large servers with many |
1039 | (1%) are active. This mirrors the activity of large servers with many |
1040 | connections, most of which are idle during at any one point in time. |
1040 | connections, most of which are idle at any one point in time. |
1041 | |
1041 | |
1042 | Source code for this benchmark is found as F<eg/bench2> in the AnyEvent |
1042 | Source code for this benchmark is found as F<eg/bench2> in the AnyEvent |
1043 | distribution. |
1043 | distribution. |
1044 | |
1044 | |
1045 | =head3 Explanation of the columns |
1045 | =head3 Explanation of the columns |
… | |
… | |
1050 | I<create> is the time it takes to create a socketpair (which is |
1050 | 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. |
1051 | nontrivial) and two watchers: an I/O watcher and a timeout watcher. |
1052 | |
1052 | |
1053 | I<request>, the most important value, is the time it takes to handle a |
1053 | 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 |
1054 | 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 |
1055 | it to another server. This includes deleting the old timeout and creating |
1056 | a new one with a later timeout. |
1056 | a new one that moves the timeout into the future. |
1057 | |
1057 | |
1058 | =head3 Results |
1058 | =head3 Results |
1059 | |
1059 | |
1060 | name sockets create request |
1060 | name sockets create request |
1061 | EV 20000 69.01 11.16 |
1061 | EV 20000 69.01 11.16 |