Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
04-20-2006, 07:19 AM
|
#1
|
LQ Newbie
Registered: Oct 2004
Location: UK
Posts: 13
Rep:
|
Linux CPU/SYSTEM problem
Hi,
I have got a linux system, which runs an application. Which meant to utilize all the CPU it can. However, there use to be 0.2% CPU idle. But recently its always 0.0% idle. I noticed on top that SYSTEM% is going high. I think that's what taking 0.2% CPU. This CPU eating application runs as a user.
Now, my question is, is there anyway I can limit a particular user to 80% of CPU. So, that user can never go more than 80% and I will always have some CPU free for SYSTEM.
Thanks in advance!
Last edited by rkmalik; 04-20-2006 at 07:44 AM.
|
|
|
04-21-2006, 01:54 AM
|
#2
|
Member
Registered: Apr 2004
Location: India
Distribution: Redhat,Fedora
Posts: 430
Rep:
|
See
man ulimit
Cheers
Z
|
|
|
04-21-2006, 04:34 AM
|
#3
|
LQ Newbie
Registered: Oct 2004
Location: UK
Posts: 13
Original Poster
Rep:
|
Doesn't give any clue for limiting CPU usage.
Please help!
|
|
|
04-21-2006, 06:11 AM
|
#4
|
Member
Registered: Apr 2004
Location: India
Distribution: Redhat,Fedora
Posts: 430
Rep:
|
Ok it was CPU time not CPU usage in ulimit.
As for cpu usage you cannot specifically say that a process should use 0% of CPu,etc
You can reduce the priority of process and allow other system processes to use CPU
This can be done with renice command
renice -n 19 pid_of_user_process
If the process is being started then start it with
nice -n 19 process
19 is the lowest priority and -20 the highest.
Cheers
Z
|
|
|
04-21-2006, 06:14 AM
|
#5
|
LQ Newbie
Registered: Oct 2004
Location: UK
Posts: 13
Original Poster
Rep:
|
Is there not anything like QoS for CPU/memory/IO ?
You can do that on Solaris 10. I am sure linux guys must have thought of that.
|
|
|
04-21-2006, 06:17 AM
|
#6
|
Senior Member
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,606
Rep:
|
maybe realtime linux kernel is something you want to look into
(saying that I know very very little on the topic, so take it as a shot in the dark)
|
|
|
04-21-2006, 06:20 AM
|
#7
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,285
|
Of course they have. A project is underway, but is still in development.
Significant patchset against 2.6.17
Yep, you read that right.
Also intersects with cpusets and clustering and various virtual server projects.
Much code that was in kernel space is now in userspace, but the "interested" projects have differing requirements.
Isn't something you can use yet, but will be very handy when polished up.
|
|
|
04-21-2006, 06:34 AM
|
#8
|
LQ Newbie
Registered: Oct 2004
Location: UK
Posts: 13
Original Poster
Rep:
|
Quote:
Originally Posted by syg00
Much code that was in kernel space is now in userspace, but the "interested" projects have differing requirements.
Isn't something you can use yet, but will be very handy when polished up.
|
That's what is the question. Is there something else I can use. I will have to try that nice "renice" command.
|
|
|
All times are GMT -5. The time now is 04:14 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|