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


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

Re: NIO multiplexing + thread pooling

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feed.news.qwest.net!mpls-nntp-01.inet.qwest.net!news-out.readnews.com!transit3.readnews.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
From Lew <lewbloch@gmail.com>
Newsgroups comp.lang.java.programmer
Subject Re: NIO multiplexing + thread pooling
Date Fri, 30 Sep 2011 07:46:45 -0700 (PDT)
Organization http://groups.google.com
Lines 21
Message-ID <2026012.1217.1317394005581.JavaMail.geo-discussion-forums@prfc6> (permalink)
References <CAA3EEF8.78BF%bravegag@hotmail.com> <alpine.DEB.2.00.1109242028540.12593@urchin.earth.li> <9e8aqfFnorU1@mid.individual.net> <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>
Reply-To comp.lang.java.programmer@googlegroups.com
NNTP-Posting-Host 24.6.43.78
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
X-Trace posting.google.com 1317394129 21180 127.0.0.1 (30 Sep 2011 14:48:49 GMT)
X-Complaints-To groups-abuse@google.com
NNTP-Posting-Date Fri, 30 Sep 2011 14:48:49 +0000 (UTC)
In-Reply-To <j62666$m5s$1@dont-email.me>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=24.6.43.78; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T
User-Agent G2/1.0
X-Google-Web-Client true
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8412

Show key headers only | 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