How to allocate more CPU and RAM to a single process

sheldonwang

Distinguished
May 6, 2010
6
0
18,520
Hello,

I have a computing intensive process that solves a system of thousands simultaneous equations. When I run it under DOS, I found that it only uses about 12% CPU while the rest is unused. Is there a way that I can allocate more (80%) CPU and RAM to it? Basically I want the whole computer to be dedicated to this single process.

Thanks so much.
Sheldon
 
Solution


So in this case, no matter how powerful the computer is (CPU and RAM), it will not improve the speed of the computing. Probably the only advantage that I can take is to run multiple instances of this program such that each instance uses one...

Collie147

Distinguished
Feb 25, 2010
354
0
18,810
well if its run under windows you can open up task manager, right click on the process and assign it higher priority and an affinity (the cpus it is allowed to run on, as sometimes one can be better than two) but that doesnt always help. Worth a try though
 

sheldonwang

Distinguished
May 6, 2010
6
0
18,520


It is written with Fortran programming language. I am not sure whether it is a multi-tread optimized. Is it possible to compile it to be multi-tread capable?

Thanks.
 

sheldonwang

Distinguished
May 6, 2010
6
0
18,520


I assigned Priority = high and Affinity = all processor , i.e., all 8 CPUs are on. But it does not seem to make the process any faster. It is the only process running under Windows (cmd.exe window); the CPU still shows 12%.

Thanks.
 
It all depends on the app.. Assigning higher priority will not increase any performance and is actually not recommended.. The app will use as much CPU as it can by default.. There is nothing you can do to make it use more resources then its programmably capable of.. Understand it like a comparison between a guy like arnold and an average guy.. Both can lift 40 kilos.. But while the average guy will be using 80 percent of this available strength, arnold just needs to use may be 20 percent..
 

sheldonwang

Distinguished
May 6, 2010
6
0
18,520


So in this case, no matter how powerful the computer is (CPU and RAM), it will not improve the speed of the computing. Probably the only advantage that I can take is to run multiple instances of this program such that each instance uses one CPU, e.g., I can run maximum 8 instances as I have 8 CPUs on my computer. provided that nothing else runs on it.

Thanks.
 
Solution
Yep, that is the way to go. Sorry for my vagueness, but what I meant was regardless of the capabilities of the language, it depends on how the code is written as to whether it is multi thread capable.

Example: a maze navigating program. 2 methods:

Single thread follows each available track until failure (restarts) or success.

Launch as many threads as there are paths at the start point. All programs run independently and in parallel

Clearly, the second method takes advantage of multi core processors.
 

sheldonwang

Distinguished
May 6, 2010
6
0
18,520



Thanks for the help. I tried to run 4 and 6 instances of my process and noticed that they are run fine simultaneously, slow though, but it meets my objectives.

Regards.