Hi all, Sometimes, the working threads occupy 100% CPU, and I just cann't ssh login with root. my question is: Is there any solution for this case? I googled and found some related links, but not helpful. http://www.linuxquestions.org/questions/linux-general-1/limit-cpu-usage-for-...
Ryan J M wrote:
Hi all, Sometimes, the working threads occupy 100% CPU, and I just cann't ssh login with root. my question is: Is there any solution for this case? I googled and found some related links, but not helpful.
I'm not aware of any method under linux directly to reserve a set amount of CPU resources. You can use /etc/security/limits.conf to restrict certain amounts of resources but there is nothing there even that impacts CPU usage on a percentage basis, and of course nothing that will reserve CPU.
If you can't login with root it sounds like the load on your system is likely very high, so I'd reduce the amount of working threads. There's a big difference between cpu usage being at 100% and a low number of things that are contributing to that 100% usage number, and having cpu be at 100% and many things contributing to that number. The latter will definitely have far more serious performance impact than the former in my experience.
I can recall on countless occasions over the years being able to login to a system that is running at 100% cpu usage and not really have any noticeable impact on being able to login or interact with the system.
nate
I can recall on countless occasions over the years being able to login to a system that is running at 100% cpu usage and not really have any noticeable impact on being able to login or interact with the system.
I agree here. I do remember not being able to log in when i/o is completely swamped though. Maybe the problem is not so much 100% cpu usage but disk i/o. The box might be thrashing swap.
On Thu, Nov 27, 2008 at 1:08 PM, Christopher Chan christopher.chan@bradbury.edu.hk wrote:
I agree here. I do remember not being able to log in when i/o is completely swamped though. Maybe the problem is not so much 100% cpu usage but disk i/o. The box might be thrashing swap.
Oh, I missed that, we do use NFS badly(nfs mount home directory) in that box, the system became hard to login when lots of people works.
PS: I think, you know, root should be loginable in any condition unless the system is down. Shouldn't it?
Thanks, nate and Christopher
Ryan J M wrote on Fri, 28 Nov 2008 08:50:39 +0800:
PS: I think, you know, root should be loginable in any condition unless the system is down. Shouldn't it?
Anyxone is able to loghin anytime, if youw ant to see it that way ;-) But the system needs the ressources to make this happen before the timeout ;-) It might also not be a CPU issue, but a bandwidth issue. If bandwidth is occupied by other users it may take a time for your packets to get thru. In any case, you may want to lower the load for that machine or give it more "power" if you can. If you cannot login as root with ssh because it times out this also means that the others experience a less than optimal performance.
Kai