← Back to team overview

maria-developers team mailing list archive

SO_REUSEPORT and mariadb

 

hi guys, i was reading the SO_REUSEPORT of kernel 3.9, and i didn't found
it in mariadb
maybe we could use it?
here are the SO_REUSEPORT topics:

https://lwn.net/Articles/542629/
http://linux.dell.com/files/presentations/Linux_Plumbers_Conf_2010/Scaling_techniques_for_servers_with_high_connection%20rates.pdf

here the important parts:
------------------

1)The first of the traditional approaches is to have a single listener
thread that accepts all incoming connections and then passes these off to
other threads for processing. The problem with this approach is that the
listening thread can become a bottleneck in extreme cases. In early
discussions<http://thread.gmane.org/gmane.linux.network/102140/focus=102150>
 on SO_REUSEPORT, Tom noted that he was dealing with applications that
accepted 40,000 connections per second. Given that sort of number, it's
unsurprising to learn that Tom works at Google.

2)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:

    while (1) {
        new_fd = accept(...);
        process_connection(new_fd);
    }

------------------

i didn


--
Roberto Spadim

Follow ups