Operating System - Linux
1753502 Members
4948 Online
108794 Solutions
New Discussion юеВ

Re: Is there any other reason, why a process should go to sleep other than waiting on disk I/O.

 
GnanaShekar
Regular Advisor

Is there any other reason, why a process should go to sleep other than waiting on disk I/O.

Hi,

I see a lot of sleeping processes from the output of top command. Please suggest,

I have run the below command using "top -u lkamath"

top - 08:55:29 up 44 days, 23:12, 13 users, load average: 0.98, 0.42, 0.25
Tasks: 207 total, 1 running, 206 sleeping, 0 stopped, 0 zombie
Cpu(s): 13.7%us, 0.3%sy, 0.0%ni, 85.9%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 8189832k total, 5956640k used, 2233192k free, 153168k buffers
Swap: 2104472k total, 9712k used, 2094760k free, 4918216k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
10611 lkamath 16 0 2536m 146m 3192 S 111 1.8 1:04.46 java
4921 lkamath 15 0 76216 1844 992 S 0 0.0 0:01.07 sshd
4922 lkamath 15 0 64320 1828 1316 S 0 0.0 0:00.04 ksh
4945 lkamath 15 0 73676 1840 1352 S 0 0.0 0:00.17 bash
6505 lkamath 18 0 64196 1636 1196 S 0 0.0 0:00.06 portrel_all.sh
6547 lkamath 21 0 65140 1252 964 S 0 0.0 0:00.02 sh
6588 lkamath 20 0 65136 1304 964 S 0 0.0 0:00.03 sh
6622 lkamath 18 0 65136 796 452 S 0 0.0 0:00.00 sh
6678 lkamath 18 0 65144 1368 960 S 0 0.0 0:00.04 sh
6715 lkamath 16 0 65144 820 412 S 0 0.0 0:00.00 sh
6754 lkamath 16 0 66168 2316 976 S 0 0.0 0:00.19 sh
10606 lkamath 17 0 66168 1800 460 S 0 0.0 0:00.00 sh
15746 lkamath 15 0 64240 1812 1340 S 0 0.0 0:00.10 ksh
19989 lkamath 15 0 76212 1928 1088 S 0 0.0 0:00.02 sshd
19990 lkamath 15 0 64320 1848 1332 S 0 0.0 0:00.05 ksh
22201 lkamath 15 0 76212 1836 996 S 0 0.0 0:00.30 sshd
22202 lkamath 15 0 64368 2056 1448 S 0 0.0 0:00.15 ksh
24071 lkamath 15 0 76216 1952 1092 S 0 0.0 0:04.26 sshd
24088 lkamath 15 0 66568 2256 1520 S 0 0.0 0:00.55 ksh
32175 lkamath 15 0 76212 1924 1092 S 0 0.0 0:00.04 sshd
32176 lkamath 15 0 64316 1836 1324 S 0 0.0 0:00.05 ksh

The user is running a test and they are timing out.

Please suggest,
Thanks & Regards,
2 REPLIES 2
Steven E. Protter
Exalted Contributor

Re: Is there any other reason, why a process should go to sleep other than waiting on disk I/O.

Shalom,

Reasons for sleep other than i/o wait

1) Bad user code.
2) Another process is bound to the CPU
3) Suspended by process management (root)

I'm sure there are other reasons and they will be posted but a normal system thats not busy will run the process. They should check their code.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
kenny chia
Regular Advisor

Re: Is there any other reason, why a process should go to sleep other than waiting on disk I/O.

Hi
Can you give more details of the test?

The process could be waiting for an event. for example response from an user input or response from another network device
All Your Bases Are Belong To Us!