Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #8412

Re: NIO multiplexing + thread pooling

From Lew <lewbloch@gmail.com>
Newsgroups comp.lang.java.programmer
Subject Re: NIO multiplexing + thread pooling
Date 2011-09-30 07:46 -0700
Organization http://groups.google.com
Message-ID <2026012.1217.1317394005581.JavaMail.geo-discussion-forums@prfc6> (permalink)
References (3 earlier) <alpine.DEB.2.00.1109272044210.14737@urchin.earth.li> <9efsnrFoviU1@mid.individual.net> <j5vdvo$kon$1@dont-email.me> <FL2dndua_qLJIx7TnZ2dnUVZ_vSdnZ2d@posted.palinacquisition> <j62666$m5s$1@dont-email.me>

Show all headers | View raw


markspace wrote:
> Peter Duniho wrote:
>> I don't have specific numbers. But I can tell you that synchronization
>> overhead, and in particular the cost of a thread context switch, is one
>> of the reasons that i/o completion ports on Windows is such a critical
>> technique for scalable networking processes.
> 
> Interesting....
> 
> <http://stackoverflow.com/questions/2794535/linux-and-i-o-completion-ports>

Context switching is a different issue from synchronization.  Context switches happen even in non-critical sections, where synchronization does not apply.

This does not invalidate the rest of Pete's points since they emanate from the cost of context switching, which is actually more frequent and a more impactful phenomenon than synchronization.

So in the simple-minded case where a separate single thread handles each connection there is possibly no synchronization at all between the threads, but context switching still militates against this technique for too many concurrent connections.

OTOH, choice of operating system and hardware can influence this equation.  For example, the QNX operating system on Intel/AMD is famously fast at context switches.

-- 
Lew

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

NIO multiplexing + thread pooling Giovanni Azua <bravegag@hotmail.com> - 2011-09-24 20:32 +0200
  Re: NIO multiplexing + thread pooling Tom Anderson <twic@urchin.earth.li> - 2011-09-24 20:46 +0100
    Re: NIO multiplexing + thread pooling Giovanni Azua <bravegag@hotmail.com> - 2011-09-24 23:09 +0200
    Re: NIO multiplexing + thread pooling Robert Klemme <shortcutter@googlemail.com> - 2011-09-25 11:33 +0200
      Re: NIO multiplexing + thread pooling Tom Anderson <twic@urchin.earth.li> - 2011-09-27 20:52 +0100
        Re: NIO multiplexing + thread pooling Robert Klemme <shortcutter@googlemail.com> - 2011-09-28 08:21 +0200
          Re: NIO multiplexing + thread pooling markspace <-@.> - 2011-09-28 08:20 -0700
            Re: NIO multiplexing + thread pooling Robert Klemme <shortcutter@googlemail.com> - 2011-09-28 18:56 +0200
              Re: NIO multiplexing + thread pooling markspace <-@.> - 2011-09-28 11:07 -0700
            Re: NIO multiplexing + thread pooling Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-09-28 17:39 -0700
              Re: NIO multiplexing + thread pooling markspace <-@.> - 2011-09-29 09:25 -0700
                Re: NIO multiplexing + thread pooling Lew <lewbloch@gmail.com> - 2011-09-30 07:46 -0700
                Re: NIO multiplexing + thread pooling markspace <-@.> - 2011-09-30 08:22 -0700
                Re: NIO multiplexing + thread pooling Lew <lewbloch@gmail.com> - 2011-09-30 08:30 -0700
                Re: NIO multiplexing + thread pooling markspace <-@.> - 2011-09-30 08:49 -0700
                Re: NIO multiplexing + thread pooling Robert Klemme <shortcutter@googlemail.com> - 2011-09-30 20:57 +0200
  Re: NIO multiplexing + thread pooling "John B. Matthews" <nospam@nospam.invalid> - 2011-09-25 00:26 -0400
    Re: NIO multiplexing + thread pooling Giovanni Azua <bravegag@hotmail.com> - 2011-09-25 11:13 +0200

csiph-web