You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/09/15 21:33:44 UTC

svn commit: r1523491 - /subversion/trunk/subversion/svnserve/svnserve.c

Author: stefan2
Date: Sun Sep 15 19:33:43 2013
New Revision: 1523491

URL: http://svn.apache.org/r1523491
Log:
More scalability goodness:
Set the accept() backlog parameter to a higher value.

* subversion/svnserve/svnserve.c
  (ACCEPT_BACKLOG): new tuning knob
  (main): use it

Modified:
    subversion/trunk/subversion/svnserve/svnserve.c

Modified: subversion/trunk/subversion/svnserve/svnserve.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnserve/svnserve.c?rev=1523491&r1=1523490&r2=1523491&view=diff
==============================================================================
--- subversion/trunk/subversion/svnserve/svnserve.c (original)
+++ subversion/trunk/subversion/svnserve/svnserve.c Sun Sep 15 19:33:43 2013
@@ -139,6 +139,15 @@ enum run_mode {
  */
 #define THREADPOOL_THREAD_IDLE_LIMIT 1000000
 
+/* Number of client to server connections that may concurrently in the
+ * TCP 3-way handshake state, i.e. are in the process of being created.
+ *
+ * Larger values improve scalability with lots of small requests comming
+ * on over long latency networks.
+ * 
+ * The OS may actually use a lower limit than specified here.
+ */
+#define ACCEPT_BACKLOG 128
 
 #ifdef WIN32
 static apr_os_sock_t winservice_svnserve_accept_socket = INVALID_SOCKET;
@@ -1115,7 +1124,7 @@ int main(int argc, const char *argv[])
       return svn_cmdline_handle_exit_error(err, pool, "svnserve: ");
     }
 
-  apr_socket_listen(sock, 7);
+  apr_socket_listen(sock, ACCEPT_BACKLOG);
 
 #if APR_HAS_FORK
   if (run_mode != run_mode_listen_once && !foreground)