Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
In Linux based os are there a optimum number of process for a processor that gives 'maximum performance' for system(or process range depend on cpu speed,cache etc...)??????
By 'maximum performance' I mean better performance? Please can someone clarify me this out.
Last edited by chamila1986; 10-24-2009 at 11:22 PM.
Reason: Not "Optimum number of processes for process" but "Optimum number of processes for processor"
Sir paulsm4,
Isn't it not changed according to the no of cores in cpu(like duel core,multi core etc) and the cash and memory sizes....?????????????????????
Last edited by chamila1986; 10-24-2009 at 11:11 PM.
There is no such thing as "an optimimum number of processes". There is no such thing as an "optimum number of processes per CPU" (in a multi-core or multiprocessor system). In fact, there is considerable debate about what "optimum" even means.
For example, "optimum" could be any of:
Quote:
1. Utilization: how much is the CPU actually being used, and how much is idle?
2. Throughput: how fast is work being processed?
3. Responsiveness: how fast does the system *appear* to be working (e.g. to a user)?
These articles gives you a good overview how you might go about evaluating "performance":
Sir,
Lets take an example.Suppose i have a calculation, that takes much time. So i allocate that task to set of processes and do the calculation. I need to do the calculation in minimum time.
I want to determine what is the best no of processes that need to do my calculation as soon as possible. To this scenario i need to keep cpu as much as busy and determine the best no of processes(Since context switching for processes may be increase the execution time).
so in multi core environment what is the best no of processes suit to do this(can u give me a rough value(are there any standard value))
/****I do not need to use user level thread approach...***/
Last edited by chamila1986; 10-25-2009 at 12:07 AM.
1. If you have one CPU, and the CPU spends 100% of it's time working on your calculation, then you have "100% utilization". In this case, that's a Good Thing - that's the ideal, best you can do.
2. If you have two CPU's, but your calculation doesn't lend itself to "parallelization" ... then one CPU is 100% utilized (like the above case) ... but the other CPU is 100% idle (because there's nothing for the second processor to do - this particular task can't be split into two, concurrent pieces). Your overall system utilization is only 50% - not so good.
3. Remember - you can't do any more work than you have processors.
If you have one work item ... but it can't be split into two pieces ... then a second CPU gains you nothing.
If you have two CPUs - and your work item CAN be split into two pieces - then both CPUs can be fully utilized (2 CPU x 100% utilization), and the job gets done in half the time. Yay!
If you have two CPUs - and your work can be split into FOUR pieces - you've gained nothing. Because you've still only got two CPU's, and they're both doing everything they can, as fast as they can (that's what "utilization" means - whether or not a system *is* doing as much work as it has *capacity* to do).
You CANNOT do more work than you have CPUs.
4. Finally, anything that either CPU does that's *NOT* part of your calculation ... means that it's going to take LONGER to perform your calculation.
So if you have more processes - then the CPUs are going to spend time servicing the processes (instead of doing your calculation).
All time spent on "system overhead" ... is time spent NOT doing your work ... which means your work is going to take longer.
More processes ... means more overhead ... which means less work.
So the ideal for two CPUs is work that can run in parallel on two processes (or two threads - in Linux, they're the same thing). The ideal for four CPUs is to be able to "parallelize" to four tasks. And so on.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.