Operating System - HP-UX
1837975 Members
2595 Online
110124 Solutions
New Discussion

find slows system down to a crawl

 
SOLVED
Go to solution
MarkSyder
Honored Contributor

find slows system down to a crawl

Hi everybody,

I've just been running a find command on an HP-UX 11.00 system.

I had to abort the command because the users complained that the system had slowed down to a crawl. When I aborted the command the system started running at an acceptable rate again.

This is the only system I support where this has happened. Any ideas as to what may cause it? And even more important, how do I prevent it?

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
23 REPLIES 23
Anupam Anshu_1
Valued Contributor

Re: find slows system down to a crawl

Could you please provide the command-line for find(1). I will try to reproduce the problem on 11.00 (also on other releases).

Regards,

Anshu
Rajesh D L
Frequent Advisor

Re: find slows system down to a crawl

Hi Mark,

You are running find command from root, it seems. Try running it from different filesystems/directories separately.

regards,
RDL.
Joseph Loo
Honored Contributor

Re: find slows system down to a crawl

hi,

please reply with the options use for the find command and also:

# what /usr/bin/find
to check the patch level of the command

regards.
what you do not see does not mean you should not believe
Pete Randall
Outstanding Contributor

Re: find slows system down to a crawl

Mark,

This is typical for find. In a Performance and Tuning class we used multiple find commands to choke the systems for demonstration purposes.

If you're using the -exec option, you may be able to improve things by instead piping to xargs, i.e.

find /tmp -mtime +2 |xargs rm

- rather than -

find /tmp -mtime +2 -exec rm {} \;



Pete

Pete
KapilRaj
Honored Contributor

Re: find slows system down to a crawl

I have the same problem on filesystems that has more than 4 Lacs files !

Change the housekeeping policies and tell the apps guys that filesystem is not a database !

Regds,

Kapil
Nothing is impossible
MarkSyder
Honored Contributor

Re: find slows system down to a crawl

Full command:

find / -name (filename) -print

what /usr/bin/find:

$Revision: 82.3 $

Mark
The triumph of evil requires only that good men do nothing
H.Merijn Brand (procura
Honored Contributor

Re: find slows system down to a crawl

Any NFS involved?

If so, that is destiny :) You asked for it, you got it. Either (temporarily) unmount all NFS/AFS/DFS filesystems, or be sure to find only in the dir trees that do not include these type of FS's

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Anupam Anshu_1
Valued Contributor

Re: find slows system down to a crawl

The latest version of find(1) on 11.00 is $Revision: 82.3.5.2. This available with PHCO_25641.

Moreover, in the command-line, give
find / -name
If you are giving some regular expressions in place of exact file name, then use double quotes. e.g.
find / -name "*file*".

Regards,

Anshu
Mark Grant
Honored Contributor

Re: find slows system down to a crawl

Mark, even the simple find you mention does have a large impact on resources. It is heavy on disk io. If the users already give the disks a good run for their money, "find" is only going to make it worse. It might be better to do small finds instead of big ones. I.e create a script that cd's to a known set of subdirectories and does a find in each one with a significant pause between each find command.

Never preceed any demonstration with anything more predictive than "watch this"
Eric Antunes
Honored Contributor
Solution

Re: find slows system down to a crawl

Try this 2 solutions:

find / -fsonly hfs -print

and

find / ! -local -prune -o -print
Each and every day is a good day to learn.
Cheryl Griffin
Honored Contributor

Re: find slows system down to a crawl

Are you running a mix of find and grep? It may be that grep is the hold up. Add a -type to your find string to search for regular files only.

# find /opt -type f ....

"Downtime is a Crime."
MarkSyder
Honored Contributor

Re: find slows system down to a crawl

Hi everybody,

Some useful things to be going on with there.

Yes, it is searching an NFS mounted drive with a very large filesystem on it - I think we may be on to something here. It's a manufacturing server, so if I dismount the fs I won't get out of the building alive!

I like the look on Antunes' possible solutions though. I'll give them a try and award points where I haven't already done so in due course.

Thanks to everyone for the suggestions.

Mark
The triumph of evil requires only that good men do nothing
MarkSyder
Honored Contributor

Re: find slows system down to a crawl

Thanks Antunes - the first of your solutions worked perfectly.

Mark

PS - any spare tickets for Euro 2004? ;-)
The triumph of evil requires only that good men do nothing
Eric Antunes
Honored Contributor

Re: find slows system down to a crawl

Hi Mark,

Unfortunatelly have I no tickets at all... :-(
Each and every day is a good day to learn.
H.Merijn Brand (procura
Honored Contributor

Re: find slows system down to a crawl

If I had any, you could get them for free. I hate football.

F1 otoh ... Go Button, go!

Enjoy, Have FUN! H.Merijn [ driving a Honda ]
Enjoy, Have FUN! H.Merijn
Dani Seely
Valued Contributor

Re: find slows system down to a crawl

Hey Mark,
You should use "nice" on such a command so that the system shares the resources rather than hogging them. Do "man nice" and check it out. Your command should look like:

# nice find / -name (filename) -print

This may take a bit longer to run because you are sharing the resources, but you won't have the system dropping to its knees.
Together We Stand!
MarkSyder
Honored Contributor

Re: find slows system down to a crawl

Antunes - good luck for Thursday. You'll need it with Wayne Rooney on this form! What a pity neither of us has a ticket :-(

Just in case any Chelsea supporters read this - he's not for sale! (I'm an Evertonian in case you hadn't guessed.)

Mark
The triumph of evil requires only that good men do nothing
Eric Antunes
Honored Contributor

Re: find slows system down to a crawl

Good like for you to Mark because that's F.C.Porto team that's playing undercovered with the Portuguese uniform! :-D

The Portuguese colors aren't green, red and yellow anymore: see the new Portuguese flag in attachment... ;-)


Each and every day is a good day to learn.
MarkSyder
Honored Contributor

Re: find slows system down to a crawl

Good luck in the semi-final :-( (although if you get the same referee you won't need luck).

I would have given you more points if that perfectly good goal had been allowed!

Mark
The triumph of evil requires only that good men do nothing

Re: find slows system down to a crawl

It's not easy for a team of 11 to play against one of 12, especially when the 12th man is holding the whistle...
Joseph Loo
Honored Contributor

Re: find slows system down to a crawl

i got only one thing to say ....

the curse of the penalty kicks ... it happen in WC '90, EC '96 and it is happening again.

regards.
what you do not see does not mean you should not believe
MarkSyder
Honored Contributor

Re: find slows system down to a crawl

See attached.

I know I started it, but could I politely suggest that we stop talking football now in case people are opening this thread thinking it's still about a unix problem? I don't want people complaining about me on the "issues" thread!

Of course, I have no objection to someone starting a new thread dedicated to football - as long as the title makes it clear so people who aren't interested can avoid it.

Mark
The triumph of evil requires only that good men do nothing
Eric Antunes
Honored Contributor

Re: find slows system down to a crawl

Hi Mark,

We had the same referee talk here in EC 2000 when we loose against France with a penalty due to Abel Xavier's hand...

I think the referees in this championship are doing a great job.
Each and every day is a good day to learn.