1834416 Members
1722 Online
110067 Solutions
New Discussion

nice cpu is almost 100%

 
Naoyuki
Advisor

nice cpu is almost 100%

Hi there.

I have a problem that nice cpu is almost 100%.
There are 4 cpus and 4 jobs are running which are using cpu almost 100% respectively but niced to 24, I guess running in background.

I don't understand why these niced jobs are using almost cpu and other non-niced jobs are stuck.
I reniced these jobs to 39 which I believe lowest priority but these jobs still used cpu almost 100% and other jobs were stuck.

HP-UX is 11.11. No swap was used at that moment and no disk busy etc.

I attached top output.

Thanks.
5 REPLIES 5
malay boy
Trusted Contributor

Re: nice cpu is almost 100%

wow!! to have the server with 4 CPU which have load average is 2 are amazing.I saw your overall CPU uptime is 2.53.That's is very-very high for multi proc server.

Instead of renice you could killed the process if it can run later.Anyway if you renice still the process will run in matters of time.

regards
mB
There are three person in my team-Me ,myself and I.
James Murtagh
Honored Contributor

Re: nice cpu is almost 100%

Hi,

Are other jobs really stuck? These processes are indeed CPU bound and it appears haven't done IO recently as their priority is almost at the lowest for a timeshare process. What you can do is stop them briefly to check what the load is without them running, i.e.

# kill -SIGSTOP 22715

will stop pid 22715 immediately. You can do this for all these pids and then check the top output. I suspect the system is otherwise idle. To restart them again use:

# kill -SIGCONT 22715

Regards,

James.
Tim D Fulford
Honored Contributor

Re: nice cpu is almost 100%

Hi

To take James point one more why not just run ONE process rather than 4. The MAY be locking each other out!

What are these jobs? can you monitor their progress?

Regards

Tim
-
Naoyuki
Advisor

Re: nice cpu is almost 100%

Thanks for the all replies.

I know there must be problems with these programs and it's been fixed actually.
What I don't understand is that even it was running niced to 24, it was still consuming almost all cpu power and other processes were stuck then machine was so slow.

I understand that if I nice processes like 24, 39, those processes will be run at lower priority than those of nice 20 which is default nice value.

Maybe do I understand wrong?
James Murtagh
Honored Contributor

Re: nice cpu is almost 100%


You can't make assumptions about the process priority just from the nice value. Yes, you can alter a timeshare processes priority using nice but depending on its scheduling history or state it could have a high priority. Timeshare process priorities in user mode fluctuate between 178 - 255, the lower being highest priority. As a process consumes more cpu time the priority will increase towards the 255 level, as you can see your processes are at 249. As their priority is so low I'd imagine any runable process on the system will have a higher priority so will be able to preempt them. At the time of the snapshot 18 processes were runable on your system, the ones I can see, apart from the 4 rougue ones, are generally system processes and have run recently. The highest priority process will always run until it blocks or is preempted. The scheduler is one of the most important subsystems in hpux so every effort is made to ensure it is also extremely stable, hence the poor performance you witnessed will not be down to these processes blocking others.