[
https://issues.apache.org/jira/browse/TS-2994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14091225#comment-14091225
]
Phil Sorber commented on TS-2994:
---------------------------------
>From the link in the description:
{quote}
The second of the traditional approaches used by multithreaded servers
operating on a single port is to have all of the threads (or processes) perform
an accept() call on a single listening socket in a simple event loop of the
form:
{code}
while (1) {
new_fd = accept(...);
process_connection(new_fd);
}
{code}
The problem with this technique, as Tom pointed out, is that when multiple
threads are waiting in the accept() call, wake-ups are not fair, so that, under
high load, incoming connections may be distributed across threads in a very
unbalanced fashion. At Google, they have seen a factor-of-three difference
between the thread accepting the most connections and the thread accepting the
fewest connections; that sort of imbalance can lead to underutilization of CPU
cores.
{quote}
> Make use of SO_REUSEPORT socket option
> --------------------------------------
>
> Key: TS-2994
> URL: https://issues.apache.org/jira/browse/TS-2994
> Project: Traffic Server
> Issue Type: New Feature
> Components: Core
> Reporter: Yunkai Zhang
> Fix For: 6.0.0
>
>
> "One of the features merged in the 3.9 development cycle was TCP and UDP
> support for the SO_REUSEPORT socket option; that support was implemented in a
> series of patches by Tom Herbert. The new socket option allows multiple
> sockets on the same host to bind to the same port, and is intended to improve
> the performance of multithreaded network server applications running on top
> of multicore systems." --[The SO_REUSEPORT socket
> option|http://lwn.net/Articles/542629/]
--
This message was sent by Atlassian JIRA
(v6.2#6252)