LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 04-20-2006, 07:19 AM   #1
rkmalik
LQ Newbie
 
Registered: Oct 2004
Location: UK
Posts: 13

Rep: Reputation: 0
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.
 
Old 04-21-2006, 01:54 AM   #2
zulfilee
Member
 
Registered: Apr 2004
Location: India
Distribution: Redhat,Fedora
Posts: 430

Rep: Reputation: 39
See
man ulimit

Cheers
Z
 
Old 04-21-2006, 04:34 AM   #3
rkmalik
LQ Newbie
 
Registered: Oct 2004
Location: UK
Posts: 13

Original Poster
Rep: Reputation: 0
Doesn't give any clue for limiting CPU usage.

Please help!
 
Old 04-21-2006, 06:11 AM   #4
zulfilee
Member
 
Registered: Apr 2004
Location: India
Distribution: Redhat,Fedora
Posts: 430

Rep: Reputation: 39
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
 
Old 04-21-2006, 06:14 AM   #5
rkmalik
LQ Newbie
 
Registered: Oct 2004
Location: UK
Posts: 13

Original Poster
Rep: Reputation: 0
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.
 
Old 04-21-2006, 06:17 AM   #6
Emmanuel_uk
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: Reputation: 53
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)
 
Old 04-21-2006, 06:20 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,285

Rep: Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165
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.
 
Old 04-21-2006, 06:34 AM   #8
rkmalik
LQ Newbie
 
Registered: Oct 2004
Location: UK
Posts: 13

Original Poster
Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
2-CPU System -- How Do I Tell If Both Are Being Used doctorcisco Linux - Newbie 14 06-25-2005 03:41 PM
Process System cpu rajesht Linux - General 1 05-19-2005 10:16 AM
Why do I have a High System CPU Usage Bottleneck linuxboy69 Linux - Software 3 09-02-2004 04:55 PM
Multithreaded System On 4 Cpu Linux Machine, process stuck on certain thread eyalzm Programming 1 05-10-2004 12:46 PM
How do I move existing system to new CPU? dnbrown Linux - Software 6 02-10-2003 04:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration