[linux-audio-user] xruns vs. disk activity

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all

I'm trying to get a gentoo based audio box (primarily Ardour) off the ground. Despite my best efforts, 
I can't eliminate xruns to a level I could live with (10ms+ xruns every 2 minutes on average seems 
excessive - esp. with stereo @ 44k1). There's some captured data at the very end of this mail.

My observations are made using;
jackd -v -R -d... -r 44100 -p 128 2>&1 | tee jacklog (i.e. stereo SB16 @44k1)
and ardour, session open but not actively playing

I'll present my questions before wandering off into a tedious list (apologies for length) of stuff I've 
already done. Would anyone care to offer an opinion on these questions;

1. Am I expecting too much? Either from my hardware, or the current state of Linux.
2. Is there a vital piece of config that I've totally overlooked?
3. Is there a better way to measure this to home in on the source of the problem?
4. Are the xruns incidental to the disk activity - is this all a symptom of something else?
5. Insert any other question I should be asking here.

Thanks in advance for any help/advice offered, I've run out of ideas.

Ta
R


The (abridged) story so far...

Google
Patched 2.4.20 with everything I found on Andrew Mortons page
Read http://myweb.cableone.net/eviltwin69/Arcana.html
Read LAU resource links
Fixed snd-card IRQ to 9
PCI latency timers set up
Killed cron/syslog
Switched to reiserfs (in desperation)
Tried hdparm incantations to no effect
Run bonnie (if I understand this, I'm getting 25Mb/s sustained block bandwidth)

              -------Sequential Output-------- ---Sequential Input-- --Random--
              -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks---
Machine    MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU  /sec %CPU
         2000  7467 73.6 25491 24.5 12476  8.3 10739 75.3 25217 10.8  90.8  1.2

Checked /var/log/messages for signs of IDE bus failures
Upgraded to alsa-driver 0.9.2
Re-emerged jack from CVS
Monkeyed with vm settings to try to smooth out the disk activity


The hardware:
Duron 1300MHz, Abit KT7A
512M PC133
primary IDE: Seagate ST360021A, QUANTUM FIREBALLP AS40.0 (80 way ribbon)
secondary IDE: CD/CDRW
AGP graphics card
SB16/128 PCI (i know - it's junk)
3Com PCI 3c905

  0:     674864          XT-PIC  timer
  1:       7927          XT-PIC  keyboard
  2:          0          XT-PIC  cascade
  8:          2          XT-PIC  rtc
  9:       1166          XT-PIC  Ensoniq AudioPCI
 11:      21381          XT-PIC  eth0
 12:      94912          XT-PIC  PS/2 Mouse
 14:      13585          XT-PIC  ide0
 15:          9          XT-PIC  ide1
NMI:          0 
LOC:     674826 
ERR:        114
MIS:          0

lspci -vv

00:00.0 Host bridge: VIA Technologies, Inc. VT8363/8365 [KT133/KM133] (rev 03)
        Subsystem: ABIT Computer Corp. KT7/KT7-RAID/KT7A/KT7A-RAID Mainboard
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Step
ping- SERR- FastB2B-
        Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort
- <MAbort+ >SERR- <PERR-
        Latency: 8
        Region 0: Memory at e0000000 (32-bit, prefetchable) [size=64M]
        Capabilities: [a0] AGP version 2.0
                Status: RQ=31 SBA+ 64bit- FW+ Rate=x1,x2,x4
                Command: RQ=0 SBA- AGP- 64bit- FW- Rate=<none>
        Capabilities: [c0] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot
-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

00:01.0 PCI bridge: VIA Technologies, Inc. VT8363/8365 [KT133/KM133 AGP] (prog-i
f 00 [Normal decode])
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Step
ping- SERR- FastB2B-
        Status: Cap+ 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort
- <MAbort+ >SERR- <PERR-
        Latency: 0
        Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
        Memory behind bridge: e6000000-e7ffffff
        Prefetchable memory behind bridge: e4000000-e5ffffff
        BridgeCtl: Parity- SERR- NoISA+ VGA+ MAbort- >Reset- FastB2B-
        Capabilities: [80] Power Management version 2
                Flags: PMEClk- DSI- D1+ D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot
-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

00:07.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 40
)
        Subsystem: ABIT Computer Corp.: Unknown device 0000
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Step
ping+ SERR- FastB2B-
        Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort
- <MAbort- >SERR- <PERR-
        Latency: 0
        Capabilities: [c0] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot
-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

00:07.1 IDE interface: VIA Technologies, Inc. VT82C586/B/686A/B PIPC Bus Master 
IDE (rev 06) (prog-if 8a [Master SecP PriP])
        Subsystem: VIA Technologies, Inc. VT8235 Bus Master ATA133/100/66/33 IDE
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Step
ping- SERR- FastB2B-
        Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort
- <MAbort- >SERR- <PERR-
        Latency: 32
        Region 4: I/O ports at d000 [size=16]
        Capabilities: [c0] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot
-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:07.4 Bridge: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] (rev 40)
        Subsystem: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI]
        Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Step
ping- SERR- FastB2B-
        Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort
- <MAbort- >SERR- <PERR-
        Interrupt: pin ? routed to IRQ 11
        Capabilities: [68] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot
-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

00:09.0 Ethernet controller: 3Com Corporation 3c905 100BaseTX [Boomerang]
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Step
ping- SERR- FastB2B-
        Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort
- <MAbort- >SERR- <PERR-
        Latency: 32 (750ns min, 2000ns max)
        Interrupt: pin A routed to IRQ 11
        Region 0: I/O ports at dc00 [size=64]
        Expansion ROM at <unassigned> [disabled] [size=64K]

00:0d.0 Multimedia audio controller: Ensoniq 5880 AudioPCI (rev 02)
        Subsystem: Ensoniq Creative Sound Blaster AudioPCI128
        Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Step
ping- SERR- FastB2B-
        Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- 
<MAbort- >SERR- <PERR-
        Latency: 248 (3000ns min, 32000ns max)
        Interrupt: pin A routed to IRQ 9
        Region 0: I/O ports at e000 [size=64]
        Capabilities: [dc] Power Management version 1
                Flags: PMEClk- DSI+ D1- D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot
-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

01:00.0 VGA compatible controller: nVidia Corporation NV5M64 [RIVA TNT2 Model 64
/Model 64 Pro] (rev 15) (prog-if 00 [VGA])
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Step
ping- SERR- FastB2B-
        Status: Cap+ 66Mhz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort
- <MAbort- >SERR- <PERR-
        Latency: 32 (1250ns min, 250ns max)
        Interrupt: pin A routed to IRQ 10
        Region 0: Memory at e6000000 (32-bit, non-prefetchable) [size=16M]
        Region 1: Memory at e4000000 (32-bit, prefetchable) [size=32M]
        Expansion ROM at <unassigned> [disabled] [size=64K]
        Capabilities: [60] Power Management version 1
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot
-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [44] AGP version 2.0
                Status: RQ=31 SBA- 64bit- FW- Rate=x1,x2,x4
                Command: RQ=0 SBA- AGP- 64bit- FW- Rate=<none>

ps ax

  PID TTY      STAT   TIME COMMAND
    1 ?        S      0:04 init
    2 ?        SW     0:00 [keventd]
    3 ?        SWN    0:00 [ksoftirqd_CPU0]
    4 ?        SW     0:00 [kswapd]
    5 ?        SW     0:00 [bdflush]
    6 ?        SW     0:00 [kupdated]
    7 ?        SW     0:00 [kreiserfsd]
   31 ?        S      0:00 /sbin/devfsd /dev
 1198 vc/1     S      0:00 login -- root     
 1199 vc/2     S      0:00 /sbin/agetty 38400 tty2 linux
 1200 vc/3     S      0:00 /sbin/agetty 38400 tty3 linux
 1201 vc/4     S      0:00 /sbin/agetty 38400 tty4 linux
 1202 vc/5     S      0:00 /sbin/agetty 38400 tty5 linux
 1203 vc/6     S      0:00 /sbin/agetty 38400 tty6 linux
 1204 vc/1     S      0:00 -bash
 1209 vc/1     S      0:00 /bin/sh /usr/X11R6/bin/startx
 1220 vc/1     S      0:00 xinit /root/.xinitrc --
 1221 ?        S<     0:33 X :0
 1234 vc/1     S      0:00 fvwm2
 1236 vc/1     S      0:01 xterm -geometry 120x70+0+0
 1239 pts/0    S      0:00 bash
 1284 vc/1     S      0:00 xterm
 1285 pts/1    S      0:00 bash
 1288 vc/1     S      0:00 xterm
 1289 pts/2    S      0:00 bash
 1313 vc/1     S      0:00 xterm
 1314 pts/3    S      0:00 bash
 1325 pts/3    S      0:00 alsamixer
 1387 vc/1     S      0:00 xterm
 1388 pts/4    S      0:00 bash
 1398 vc/1     S      0:00 xterm
 1399 pts/5    S      0:00 bash
 1580 pts/0    S      0:00 jackd -v -R -d alsa -d card0 -r 44100 -p 128
 1581 pts/0    S      0:00 tee jacklog
 1582 pts/0    SL     0:11 jackd -v -R -d alsa -d card0 -r 44100 -p 128
 1589 pts/2    SL     0:26 /usr/lib/ardour/ardourx
 1616 pts/1    S      0:00 emacs jacklog.awk
 1631 pts/1    R      0:00 ps ax

I used this (jacklog.awk) to parse the output from jackd:
>>>>
$0 ~/load/ {

    count++;
    seconds++;
}

$0 ~/xrun/ {
  cost = ($7 * 1000)/count;
  print count "\t" $7 * 1000 "\t" cost;
  count = 0;
  xruns++;
}

END {
  minutes = int(seconds / 60);
  seconds = seconds - (minutes * 60);
  time = (minutes * 60) + seconds;
  print xruns " xruns in " minutes":"seconds " (" time " seconds) average " time/xruns;
}

<<<<

which gave me this (cost function is extremely crude);
108     675     6.25
207     690     3.33333
196     1400    7.14286
34      10608   312
69      2658    38.5217
44      14553   330.75
117     465     3.97436
39      913     23.4103
206     1724    8.36893
108     8710    80.6481
176     12596   71.5682
58      1237    21.3276
182     15688   86.1978
53      4315    81.4151
233     1100    4.72103
95      8932    94.0211
5       1917    383.4
83      6378    76.8434
44      226     5.13636
10      7923    792.3
10      825     82.5
44      6949    157.932
44      1094    24.8636
15      455     30.3333
88      1220    13.8636
25 xruns in 39:30 (2370 seconds) average 94.8



[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux