[Ardour-Users] X Runs at Exactly 10 Minute Intervals

Brett Clark Brett at ciscoinc.com
Wed Sep 26 11:03:54 PDT 2007

>> # ps -C jackd -cmL 
>> As I understand it, the FF indicates realtime.

  i want to point out that the CLS column in your 'ps -C jackd -cmL' command does not show priority.  Its a 'class' column and FF shows FIFO.  The following command will show you both the priority and the RT status of jackd and threads:  ps -C jackd -L -o rtprio,pri,cmd
Im not sure how many of the threads should have RT, but i know at least 1 of them should.  I actually show 5 threads on my system and only 2 of them have RTPRIO values.  At the same time, im not sure i should make any claims that my system is setup perfect either :)
>> the column labeled PR = Priority?
Yes.  But this is scheduler priority as opposed to the RT priority (RTPRIO).
Im grasping at straws with these questions:
1) have you changed any of the latencies on your PCI bus (setpci)?
2) Does jackd use a tmpfs mount as opposed to a regular drive?  For instance, my jackd is set to use a RAM drive instead of a physical HDD to reduce overhead.
3) can you run a 'vmstat 5' around the 10 minute mark and see if the cpu 'us' or 'sy' spike?  Also check for swapping.
4) if you run an 'iostat 5' at the 10 minute mark, do you see a spike in blk_read or blk_wrtn?  You will want to ignore the first output and watch the additional outputs.
#3 and #4 are just my attempts to try and narrow down if its a cpu/mem thing or if its an hdd/io thing.  
Disclaimer: Im actually a Redhat (Fedora) guy, so i may be off base with some of my assumptions and ideas.


From: Martin Lynch [mailto:martin.lynch at shaw.ca]
Sent: Wed 9/26/2007 11:34 AM
To: Brett Clark
Subject: Re: [Ardour-Users] X Runs at Exactly 10 Minute Intervals

Many thanks for the response Brett!

I don't have a /var/log/cron file, however I did have a look at every file in /var/log and couldn't spot anything suspicious. Using top, the only thing that came to the top was Xorg, but it comes to the top on a fairly regular basis (many times a minute). Does the column labeled PR = Priority? If so, it's showing 15, which is odd since I have it set to 89 in Qjackctl. /etc/cron.d has 4 files, none of which appear to be scheduled at 10 min intervals.

I wondered about your polling suggestion also. The only app I can recall which might do this is Thunderbird, which I have set to check for mail every 10 mins (however I close it before using JACK). As an experiment I'll try changing it to 20 mins and see if that helps.

Any other thoughts or places I could look for 10 minute occurrences?

Thanks again - really appreciate you taking the time to help!

Brett Clark wrote: 

	This sounds very suspicious like a cron entry.  You mentioned checking the System Manager, but im wondering if that would show all potential cron jobs.  Can you do a 'tail /var/log/cron' and see if there's anything executing at the time of the XRuns.  Usually there will be an sa1 audit running every 10 minutes, but that should be pretty light. Additional cron jobs that execute in that timeframe could be scheduled in the /etc/cron.d directory.
	Another problem could be a constant running job that does some type of polling at 10 minute intervals and increases the system load.  One way to locate this would be to run 'top' and see what pops to the top when the XRuns happen.
	From: ardour-users-bounces at lists.ardour.org on behalf of Martin Lynch
	Sent: Wed 9/26/2007 10:44 AM
	To: ardour-users at lists.ardour.org
	Subject: [Ardour-Users] X Runs at Exactly 10 Minute Intervals
	Hoping someone can help me figure out what's causing X runs at precisely 10 minute intervals - not 9:59, not 10:01 but exactly 10 mins.
	My setup: 
	AMD 64 X2
	2 GB DDR2 800 mhz
	M-Audio Firewire Solo using Freebob
	Sample rate: 96,000
	Periods: 3
	Frames: 64
	Latency: 2 ms
	Realtime checked in Qjackctl
	Priority = 89
	Qjackctl 0.2.21
	# ps -C jackd -cmL 
	24142     - -     - ?        00:14:40 jackd
	    - 24142 TS   20 -        00:00:00 -
	    - 24143 TS   24 -        00:00:00 -
	    - 24144 TS   24 -        00:00:00 -
	    - 24145 TS   24 -        00:00:00 -
	    - 24146 FF  139 -        00:00:00 -
	    - 24147 FF  129 -        00:05:51 -
	    - 24148 FF  132 -        00:00:00 -
	    - 24149 FF  132 -        00:00:00 -
	    - 29990 FF  139 -        00:00:00 -
	    - 29991 FF  133 -        00:00:25 -
	As I understand it, the FF indicates realtime.
	Messages from JACK:
	Load = 6.0202 max usecs: 44.000, spare = 622.000
	LibFreeBoB ERR: SLAVE XMT : Buffer underrun! 64 (0 / 256) (0 / 0 )
	17:34:51.873 XRUN callback (2).
	FreeBoB MSG: xrun detected
	LibFreeBoB ERR: Xrun on connection 1
	load = 53.0101 max usecs: 3481.000, spare = 0.000
	load = 29.7333 max usecs: 43.000, spare = 623.000
	Load = 4.9502 max usecs: 25.000, spare = 641.000
	LibFreeBoB ERR: MASTER RCV: Buffer overrun!
	LibFreeBoB ERR: Xrun on connection 1
	17:44:51.782 XRUN callback (3).
	FreeBoB MSG: xrun detected
	load = 4.4270 max usecs: 26.000, spare = 640.000
	Note that in the first instance it's an underrun; 2nd instance an overrun, which seems odd to me (ie I'd think with the X runs happening on such a precise schedule it would show the same problem each time).
	I've tried using System Manager to track down any processes which might be scheduled to run every 10 mins and can't pin down anything. I also tried stopping ntpd but the problem continued.
	Other programs which run simultaneously:
	- Beryl
	- Mythtv backend
	Using Ardour neither increases the X runs nor eliminates them - they still pop up at 10 min intervals.
	Any ideas or suggestions? Could Freebob be the problem? Are there system processes known to run at 10 min intervals that could be interfering?
	Also, not sure this has anything whatsoever to do with my X runs, but Qjackctl also reports a whole series of:
	QTextCursor::gotoParagraph Index: 49 out of range
	load = 4.1724 max usecs: 26.000, spare = 640.000
	load = 4.0381 max usecs: 26.000, spare = 640.000
	load = 3.9710 max usecs: 26.000, spare = 640.000
	QTextCursor::gotoParagraph Index: 49 out of range
	QTextCursor::gotoParagraph Index: 49 out of range
	I also tried running JACK from console, with the same results.
	Driving me nuts as every time I need to do a take, I have to wait until an X run hits, then I have a 10 min window to record, which leaves me thinking about the impending X run, rather than the part I'm playing!
	Many thanks!

More information about the Ardour-Users mailing list