LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-21-2012, 11:24 AM   #1
bfcash
LQ Newbie
 
Registered: Jun 2012
Posts: 5

Rep: Reputation: Disabled
Question process blocks on recv() every 10 seconds


I have a multi-process application in which one of the processes blocks on a UDP socket using recv(). When a message is received, the process executes, then loops back to the recv() to block again for the next message. This process runs at max RT priority on a dedicated core (single quad-core CPU, non-hyperthreaded). Often my application will get into a state where, every 10 seconds (exactly), the process waiting on the recv() will block for ~100ms even though there should be a message waiting to be read (according the Wireshark). The messages arrive every 16.667 ms, therefore several will are queued to be read by the (apparently) blocked process.

Another symptom is that the entire processer is blocked, as if it is busy servicing a higher-priority process or ISR. Just no idea what it could be.

I have searched extensively based on the 10-second symptom. The most promising result was the watchdog processes, but I've removed those w/out any effect. Any suggestions as to what else might occur at that frequency? Note that occasionally the symtom is separated by more than 10 seconds, but when this occurs it is always a multiple of 10 (eg, every 20 seconds, every 40 seconds).

Does not appear to be related to the NIC (tried newer driver, and using on-board ports instead). Occurs when running in either X or console mode.
 
Old 06-25-2012, 07:43 AM   #2
bfcash
LQ Newbie
 
Registered: Jun 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Okay, for anyone who is curious, I have solved this problem (though I still don't fully understand what was going on). After closely monitoring all the the process activity for some time, I noticed that the symptom would only occur when the process kslowd000 or kslow001 was running in the same core. Even though I had noticed those processes were using a lot of time, I never paid much attention to them because their priority was much lower than the process being affected, but as soon as I would bind kslowd* to core 0 the symptom would dissappear. So my solution was to permantly bind those processes to core 0. Not perfect, as I still don't know exactly what was going on, but it works.

Thanks to all who read this and at least scratched their heads.
 
Old 06-25-2012, 07:46 AM   #3
bfcash
LQ Newbie
 
Registered: Jun 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Also, I realized that I never mentioned the Linux specifics (newbie mistake). I am running RHEL 6.1 (2.6.32-220) on an Intel quad-core Zeon.
 
Old 06-26-2012, 02:11 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Moved to Linux-General asper OP's request.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] jbd2/sda1-8 What exactly is this process that keeps running every few seconds? damgar Linux - Software 6 07-17-2017 12:03 AM
Process blocks for 100ms every 10 seconds bfcash Linux - General 3 06-22-2012 05:54 PM
Accessing Process Control Blocks Kobbler1234 Programming 2 02-24-2008 09:08 PM
How to view process control blocks in linux? chandrakumarhv Linux - Newbie 1 10-12-2007 01:49 PM
Trying to get ps to display time a process has been running in seconds kinetik Programming 1 02-26-2007 07:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration