Re: surprisingly slow accept/connect cycle time

From: Henrik Storner (henrik-kernel_at_hswn.dk)
Date: 05/24/05

  • Next message: Christoph Lameter: "Re: NUMA aware slab allocator V3"
    To: linux-kernel@vger.kernel.org
    Date:	Tue, 24 May 2005 21:34:00 +0000 (UTC)
    
    

    In <17043.37997.993745.877259@newbie.ardi.com> "Clifford T. Matthews" <ctm@ardi.com> writes:

    >While writing some test code, I was surprised to find a couple
    >processes running very slowly. The attached program illustrates this.
    >The program forks and the child attempts to accept 1000 connections.
    >The parent attempts to connect 1000 times. This often takes minutes
    >to run, on 2.4 kernels and 2.6 kernels (including 2.6.12-rc4).

    Have you tried using non-blocking sockets ?

    I've been doing some network programming myself lately, and my apps
    have no problem handling a sustained load of 40 connections/second -
    which should handle your testcase in 25 seconds. And I'm quite sure it
    will be less, because it has handled peak loads of several hundred
    connections per second.

    But my program uses non-blocking sockets exclusively.

    Henrik

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Christoph Lameter: "Re: NUMA aware slab allocator V3"

    Relevant Pages

    • Re: connect, socket API, is sending the connection request after long delay
      ... In our application we need to communication with multiple devices ... We're are using non-blocking sockets. ... until one of the first ten connections actually is completed. ... event ID 4226 appears in the system event log. ...
      (microsoft.public.vc.mfc)
    • Creating a server to accept 30000 TCP Connections in Solaris 10 & System Resource Problem!
      ... connections using non-blocking sockets. ... fails stating no free memory. ... I think this has something do with System Limitation for each process. ...
      (comp.unix.solaris)
    • Re: file as a directory
      ... And network connections, and pipes are files ... You can't just go around pretending an element in an array is the ... recursion _has_ to stop somewhere. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: ip contrack problem, not strictly followed RFC, DoS very much possible
      ... > otherwise idle session, you nuke a perfectly good idle session for reasons ... Shouldn't it be protocols thingie to take care about connections? ... This value as it is now, keeps too many connections in memory, which often leads ... To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: oops reiserfs / kernel
      ... > The server has started to refuse all connections after several days of ... After a reboot it worked well during 5 hours ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)