This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes running time and number of processors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "running time and number of processors" Watch "running time and number of processors" New topic
Author

running time and number of processors

Steve Yu
Ranch Hand

Joined: Mar 26, 2003
Posts: 60
Suppose I run a pgm "java MyPgm param_1" on my machine I find it takes 1 hour. Then I run "Java MyPgm param_2" it takes 1 hr. Then I have to run "java MyPgm param_3", etc. Instead of running them one after another, I want to invoke two background jobs simultaneously, ie. run
java MyPgm param_1
java MyPgm param_2
java MyPgm param_3
simultaneously.
Now how much time will it save ? Should it be ---
(sum of time of running one by one = 3hrs ) / number of processors ?
Thanks,
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Sort of depends. What percentage of your CPU is each process using?
If each one maxes out your CPU power, running in three different JVMs will not fix your problem.


"JavaRanch, where the deer and the Certified play" - David O'Meara
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: running time and number of processors
 
Similar Threads
Performance not improving after using Multithreading
concurrent threads
need more skill on dual cpu system?
Java Multi-Processing?
job speed and # of processors