Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Threads and Performance  RSS feed

 
Avianu Sud
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I have a question about Threads use in Weblogic:

Weblogic recommends 25 Threads as a good number of Threads.

Top performing servers (Linux server with 4 CPU) can process 3000 Transactions per second.

http://www-03.ibm.com/servers/eserver/pseries/news/pressreleases/2005/aug/570.html

So I am unsure how(and whether) such few threads can give such as high performance?
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Avianu Sud:
... Weblogic recommends 25 Threads as a good number of Threads...

That seems rather arbitrary. Is there a particular context in which that quantity is recommended?

According to Bruce Eckel's Concurrency Chapter in Thinking in Java...
...it seems that there is an upper bound to the number of threads you�ll want to create, because at some number, threads seem to become balky. This critical point can be hard to detect, and will often depend on the OS and JVM; it could be less than a hundred or in the thousands...

I think the key is: It depends.
 
Norm Radder
Rancher
Posts: 1734
22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it depends. Too many and the OS spends too much time going from one to another. It also depends on what each thread is doing and what hardware is available. If a thread is waiting an external event, then more might be ok as the thread is blocked anyway waiting for the event to happen. If there are no external events, and there is no hardware that allows for overlapped processing, then extra threads are just more overhead on the system.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!