Operating System - HP-UX
1827293 Members
3344 Online
109717 Solutions
New Discussion

Long running defragmentation

 
SOLVED
Go to solution
Gary Hines
Advisor

Long running defragmentation

Okay, I may have made a little boo-boo. I started a defrag of our largest file system yesterday through SAM. It's still running after 22 hr., and it's affecting system performance. I'm getting a little tired of the angry glares from co-workers, so does anyone know if there is a way to stop it fairly gracefully (in other words, without losing data). Next time, I promise to use the -t option. Thanks for any help.

5 REPLIES 5
Michael Steele_2
Honored Contributor

Re: Long running defragmentation

You can kill the fsadm process without loss of data.

Since you have such a large file system, one that sounds like it hasn't been defragged for awhile, defrag more frequently.
Support Fatherhood - Stop Family Law
Gary Hines
Advisor

Re: Long running defragmentation

Do you mean I can actually use a kill -9 on it? I tried a plain, vanilla kill, and a kill -15, and it pretty much ignored me.

Believe, I do plan to defrag more often (with the -t option though).
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Long running defragmentation

Do not do a kill -9; I can't imagine a more dangerous command to send a SIGKILL to. Try a kill -1, kill -2, and kill -3. If one of those doesn't do it then let it continue. The way to test is to do a kill -0 PID and then check ${?}; if ${?} is zero, PID still refers to a running process.

In most cases (there are exceptions) is is difficult to measure much less pervceive significant performance gains from this procedure.
If it ain't broke, I can fix that.
Michael Steele_2
Honored Contributor

Re: Long running defragmentation

Well I was going to suggest a kill -9 and fsck but I'm finding references not to kill defrag once started.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=39004

Instead I'm going to suggest that you renice the defrag process with a lower priority and let it terminate on its own.

http://docs.hp.com/en/B2355-60103/renice.1M.html

I suggest:

renice -n +10 -p pid

-n +10 will give you a nice value of 30, in a range of 0 to 39.

Support Fatherhood - Stop Family Law
Gary Hines
Advisor

Re: Long running defragmentation

Okay, killing is out the window. Thanks for pointing out renicing to a lower priority. I hadn't thought about that. At least that way it won't get quite as much in the way.