cancel
Showing results for 
Search instead for 
Did you mean: 

fuser uses too much CPU

 
SOLVED
Go to solution
Fedon Kadifeli
Super Advisor

Re: fuser uses too much CPU

Today I opened a case in HP ITRC. I will inform you about the outcome.
MaSa_3
Advisor

Re: fuser uses too much CPU

@Dennis: Thanks for the explanation of pstat calls.
Here is a nice document about it, I later found.
http://docs.hp.com/en/1216/pstat_whitepaper.pdf

So we know now it was not fuser/lsof is doing something wrong.

In my case it was also "utild" that owns the pid which need that much pstat calls and has that much memory regions.

So asking HP will be the best.
Evidently this behavior of "utild" exists over at least two different HP-UX versions. HP-UX 11.11 (my case) and still on HP-UX 11.31 (Fedons Case).
Dennis Handly
Acclaimed Contributor

Re: fuser uses too much CPU

>MaSa: So we know now it was not fuser/lsof is doing something wrong.

Not really. :-)
fuser or lsof could be optimized to ask pstat_getprocvm(2) for N regions at one time, not one. This could make it N times faster, even for the utild(1m) hog.
Highlighted
MaSa_3
Advisor

Re: fuser uses too much CPU

I learned from HP Support that there is a software Package for HP-UX 11.11 which provide an optimized fuser command.

https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=NEWFUSER11i

The package includes also brunch of patches installation requires a reboot.
It is available for free but it is just for 11.11 so no help for Fedon

I installed it on a test box and can confirm that the number of pstat calls used by the new fuser command was reduced considerable, with a different pstat API usage.

We hope that this fixes the problem discussed here, but there is no way to prove it, because we do not know how to
reproduce the problem if it is once gone due to a reboot or a restart of utild.
We just can wait, but the issue seams to occur only on system with significant uptime about 100 days or more.

Since it took a long time and much effort for me to get new software on productive systems I agreed with HP Support to stop analyzing this issue for my case.
I put the fuser update into the queue for software updates brought to production and wait if we ever see this problem again.

Let us wait and see what we will hear from Fedon and HP-UX 11.31
Fedon Kadifeli
Super Advisor

Re: fuser uses too much CPU

Thanks for the update MaSa.

I haven't got any response from HP Support yet.

BTW, this will not solve your problem with other commands, like lsof. Don't they think that there might be a problem with utild?
Dennis Handly
Acclaimed Contributor

Re: fuser uses too much CPU

>MaSa: but there is no way to prove it, because we do not know how to reproduce the problem if it is once gone due to a reboot or a restart of utild.

There is an obvious way, create a program that creates 27+ K memory regions.
Or look closely at the tusc output:
pstat(PSTAT_PROC_VM, 0x7eff3f80, 104, 24924, 27324) . = 1

pstat should return a multiple of 1 and that 104 should be that multiple or larger.
Dennis Handly
Acclaimed Contributor

Re: fuser uses too much CPU

These new linker patches should fix the dld memory leak:
PHSS_41179 11.31 linker + fdp cumulative patch
PHSS_41178 s700_800 11.23 linker + fdp cumulative patch
PHSS_41214 s700_800 11.11 ld(1) and linker tools cumulative patch