Closed Thread Icon

Preserved Topic: Maximum Usable Threads (Java) (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12249" title="Pages that link to Preserved Topic: Maximum Usable Threads (Java) (Page 1 of 1)" rel="nofollow" >Preserved Topic: Maximum Usable Threads (Java) <span class="small">(Page 1 of 1)</span>\

 
WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 06-05-2002 21:40

How would one go about determining the optimul number of threads to run?

If I write a program that needs to parse 9999 different oporations it would be really easy to simply place 9999 threads running on this process. However, I am sure that only a fraction of these would actually run due to the CPU constraints.

Is there an algorithm one could use in there head to get the number of threads one should use.

IE. Currently I am running ~80% free CPU usage. I have a 1GHz processor. Therefore ~800MHz worth of free at approximately 100MHz per thread, I could run 8 threads to optimize CPU usage.

Anyone have any ideas?

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 06-05-2002 22:21

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 06-05-2002 22:48

threads! uhhhh, i hate them!

though you cant really go without them! but i hate them!

DigitalUbiquity
Bipolar (III) Inmate

From: St. Paul, MN, USA
Insane since: Jan 2002

posted posted 06-06-2002 15:09

Though Java doesn't impose limits on the number of threads running concurrantly, the OS does, so even if your program is running 9999 threads, only as few as a few hundred on some OS's will actually get CPU time. Until they are done Java just holds the other.

DigitalUbiquity

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 06-08-2002 03:30

With this current information I would then think that if my program could optimally run 9999 threads, then I should have it run that many and let the operating system handle it.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 06-08-2002 09:03

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

« BackwardsOnwards »

Show Forum Drop Down Menu