UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

#1 2008-01-09 08:43 AM

urw
Member
Registered: 2007-07-16
Posts: 9

Re: Process freeze

What can cause a linux process to freeze for about 5 seconds and then continue as usual ?
It doesn't seem like a deadlock problem.   Is it reasonable that the process won't get cpu for such a long time ?

Offline

#2 2008-01-09 10:26 AM

thinking
Member
Registered: 2005-09-15
Posts: 103

Re: Process freeze

well there is a wide range of possiblities why this happens
from my expirience i would say, if the server is heavy loaded there is a resource which is heavy used and your process isn't able to access it immediately
this could be when the kernel begins to swap out or some other process, e.g. a webserver, is spawning childs like crazy which means the kernel needs to handle more processes or there is much I/O
if the server doesn't have much to do i would say the problem either is a remote server or the architecture of the application itself isn't good (e.g. deadlock)

to really know i would suggest using 'strace -p [PID]'
check the manpage for strace

Offline

#3 2008-01-09 10:35 AM

biologz
Administrator
From: Puking on the pavement
Registered: 2005-11-02
Posts: 396

Re: Process freeze

Hi,

Yeah there are a few possible reasons. But you want to get rid of that, you could try put the process to a higher priority with "nice" command.


gethostbyintuition() is still a dream of mine

                                                 -- quoted from bash

Offline

#4 2008-01-09 03:02 PM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,230

Re: Process freeze

Lack of CPU time isn't the cause, so fiddling with nice won't help (except if it was a
priority inversion problem which is then hidden).

vmstat, strace, top etc. are useful to find out what's going on.

Offline

#5 2009-10-20 06:30 AM

jfriesne
Administrator
From: California
Registered: 2005-07-06
Posts: 348
Website

Re: Process freeze

Whenever I see behavior like that on my Mac, it's usually because the d*mn hard drive went to sleep and it takes a few seconds for it to wake back up... during which time any program that is trying to access the disk is blocked.

Solution:  disable "Put Hard drive to sleep when possible" in the Energy Setting s dialog.

Perhaps other OS's have a similar "feature", I don't know.

Offline

#6 2009-10-31 01:12 PM

skyroish73
Guest

Re: Process freeze

I am finding that I am becoming more comfortable and brave in using process language in liturgy, preaching, etc.  Would love to be in communication with others about this.
SuzeinBerkeley

Board footer

Powered by FluxBB