Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am having Linux server and load average is 25% user issued ls command on folder which has more than 50 thousand files these process are hunged stat I am not able to kill these process because these process do not have parent ID . I have tried kill -9 and other options but these arenot getting killed

How can I kill these process to brign sown the load to normal

share|improve this question
1  
Can you clarify what you are seeing in the top? Are you seeing a single ls process, or are you seeing multiple ls processes? What Status is in the S column (R, S, D, Z, etc)? Is the folder on a local disk, or a remote mount (NFS,SMB, etc)? –  Russell Heilling Jun 16 '09 at 15:15
    
status is D and it is mounted on NFS –  chao Jun 16 '09 at 15:29

2 Answers 2

It sounds like you have lost your connectivity to the NFS server. The processes may recover if connectivity to the mount is restored. You may want to investigate the NFS server and make sure all is well before rebooting.

In order to avoid getting in this situation again in the future you may want to investigate whether the 'intr' or 'soft' NFS mount options are suitable for your configuration.

The 'soft' option will cause disk write operations to fail after a timeout if connectivity is lost. the 'intr' option will keep retrying the operation indefinitely but will allow you to kill the processes manually.

Note that 'soft' can cause data corruption, so 'intr' is generally preferred (from nfs(5) man page)

share|improve this answer

When you say load average, you mean the three numbers on the top line on the right side? Your screen looks something like this?:

load average: 25.0, x.x, x.x

That's not really a percent. That's the number of processes waiting on the processor. Unless you've got a ton of cores, that's not a good number.

Have you tried killing the shell that invoked the 'ls'?

share|improve this answer
    
Thanks Matt,i will try this if it can help –  chao Jun 16 '09 at 15:17
    
I suspect these processes may be stuck in Disk sleep (state D in ps or top). If this is the case killing the parent will not help. AFAIK the only way to get rid of processes stuck in disk sleep is to reboot. –  Russell Heilling Jun 16 '09 at 15:19
    
I am not able to see shell for these process. It is in state D.. I guess only way to get rid of this is reboot :( –  chao Jun 16 '09 at 15:24
    
Your description is not quite correct. The load average is not the number of processes waiting on the processor. On Linux, the load average includes processes in the running, runnable, and uninterruptible sleep states. That means the load goes up by 1 for each processor currently using the CPU, waiting for the CPU, or waiting for something else (usually disk I/O, or in this case, NFS). –  Kamil Kisiel Jun 17 '09 at 21:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.