Operating System - HP-UX
1754141 Members
3529 Online
108811 Solutions
New Discussion юеВ

Re: find command causes mem problems

 
p7
Frequent Advisor

find command causes mem problems

hi all

has anyone ever seen the find command suck up memory and cause swapping?

thx in advance
4 REPLIES 4
Bill Hassell
Honored Contributor

Re: find command causes mem problems

Did you see find process growing larger and larger? Or was this condition the result of other commands strung together such as xargs? To see the size of all the processes, you can use this command (copy/paste as shown):

UNIX95=1 ps -e -o vsz,pid,ppid,args | sort -rn | head -20

This will show the largest processes. Run it several times to see if some are growing larger.


Bill Hassell, sysadmin
Ismail Azad
Esteemed Contributor

Re: find command causes mem problems

Did you terminate the loop with + for the find command?
Read, read and read... Then read again until you read "between the lines".....
Dennis Handly
Acclaimed Contributor

Re: find command causes mem problems

Do you have your buffer cache too big?
James R. Ferguson
Acclaimed Contributor

Re: find command causes mem problems

Hi Pasquale:

What's chicken and what's egg?

That is, are you monitoring performance before starting the find() or is your find() taking longer than you expected and *then* you see performance issues?

How are you measuring swapping? What values do you see when find() isn't running and what values do you see when it is. Page-in activity is immaterial. What matters is the page-out values as reported by 'vmstat'.

If you post the *exact* find() command (in full) that you are using, we might be able to provide some better commentary.

Too, give us an idea of the number (if only in orders of magnitude) of items that find() traverses. That is, are you only searching a directory like '/etc' or are you searching something like '/var' on a heavily patched system?

Regards!

...JRF...