Sign in with
Sign up | Sign in
Your question
Solved

How to allocate more CPU and RAM to a single process

Tags:
Last response: in CPUs
Share
May 6, 2010 4:18:14 AM

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
a b à CPUs
May 6, 2010 4:27:25 AM

Is the code multi-thread optimized/capable?
m
0
l
May 6, 2010 1:10:00 PM

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
m
0
l
Related resources
May 7, 2010 12:10:40 AM

EXT64 said:
Is the code multi-thread optimized/capable?


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.
m
0
l
May 7, 2010 12:20:54 AM

Collie147 said:
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


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.
m
0
l
a c 81 à CPUs
May 7, 2010 1:08:18 AM

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..
m
0
l
May 7, 2010 3:26:54 AM

Emperus said:
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..


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.
m
0
l

Best solution

a b à CPUs
May 7, 2010 4:36:24 AM

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.
Share
May 9, 2010 4:17:27 PM

EXT64 said:
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.



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.
m
0
l
May 19, 2010 1:41:51 AM

Best answer selected by sheldonwang.
m
0
l
!