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


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

Re: nThreads

From markspace <markspace@nospam.nospam>
Newsgroups comp.lang.java.programmer
Subject Re: nThreads
Date 2013-02-13 16:06 -0800
Organization A noiseless patient Spider
Message-ID <kfh9p5$ciq$1@dont-email.me> (permalink)
References <e8f7a805-da38-4882-8037-2c964982abd1@googlegroups.com>

Show all headers | View raw


On 2/13/2013 3:25 PM, bob smith wrote:
> How much is too much in terms of me telling it how many threads I
> want?  Is it okay to ask for 100 threads?  What about 256?

It depends on your system and your application, and you should measure 
your system performance (and other metrics) to determine what is best 
for your particular case.  I'm sorry I don't know much about practical 
ways to go about those measurements.

However, 100 to 300 threads is trivial for most modern system.  Since 
most tasks will be IO-bound, it make sense to have lots of threads so 
some can be running while others wait for data to be returned.  (Sorry 
to contradict Mr. Meier but I'm pretty sure he's off base.)  Given a 
"typical" application I'd probably use 300 threads to start off and 
measure from there.

3000 is probably approaching some sort of upper limit on most "average" 
servers.  Don't neglect to measure actual running performance, but I 
don't think commodity hardware can handle that many practically.

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


Thread

nThreads bob smith <bob@coolfone.comze.com> - 2013-02-13 15:25 -0800
  Re: nThreads Joerg Meier <joergmmeier@arcor.de> - 2013-02-14 00:46 +0100
    Re: nThreads Roedy Green <see_website@mindprod.com.invalid> - 2013-02-14 03:43 -0800
    Re: nThreads Arne Vajhoej <arne@vajhoej.dk> - 2013-02-15 08:56 -0500
  Re: nThreads markspace <markspace@nospam.nospam> - 2013-02-13 16:06 -0800
    Re: nThreads Joerg Meier <joergmmeier@arcor.de> - 2013-02-14 01:46 +0100
      Re: nThreads Lew <lewbloch@gmail.com> - 2013-02-13 17:27 -0800
      Re: nThreads Robert Klemme <shortcutter@googlemail.com> - 2013-02-14 22:19 +0100
      Re: nThreads Arne Vajhoej <arne@vajhoej.dk> - 2013-02-15 08:59 -0500
  Re: nThreads Roedy Green <see_website@mindprod.com.invalid> - 2013-02-13 18:37 -0800
    Re: nThreads Arne Vajhoej <arne@vajhoej.dk> - 2013-02-15 09:01 -0500
  Re: nThreads Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-02-14 07:07 -0400
  Re: nThreads Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-02-14 09:55 -0800
  Re: nThreads Arne Vajhoej <arne@vajhoej.dk> - 2013-02-15 08:55 -0500

csiph-web