rtirq prioritizing.
Len Ovens
len at ovenwerks.net
Sat Jun 30 00:37:38 UTC 2012
While alpha testing 12.10, It seemed to me that the audio performance was
much worse than with precise. (you may have seen some comments on IRC)
Well, I rebooted to precise and it was now just as bad... what had
changed? There was only one difference I could see. When testing ISO
installs I install to a usb mass storage device (40 Gig). So I removed it
and performance was like I remembered it, UBS audio IF with jack set to
-p64 and wireless module unloaded was good for no xruns. clearly, the
external hard drive was a problem but I needed it for testing. So maybe
rtirq settings could help. The stock config is:
RTIRQ_NAME_LIST="rtc snd usb i8042"
ps -eo comm,rtprio shows:
irq/16-ehci_hcd 50
irq/16-uhci_hcd 80
irq/17-uhci_hcd 79
irq/18-uhci_hcd 78
irq/19-uhci_hcd 77
irq/12-i8042 74
irq/1-i8042 75
irq/8-rtc0 90
irq/16-ath9k 50
irq/45-eth0 50
irq/46-snd_hda_ 85
cat /proc/interrupts shows:
0: 8341859 0 IO-APIC-edge timer
1: 2462 0 IO-APIC-edge i8042
8: 1 0 IO-APIC-edge rtc0
9: 23283 0 IO-APIC-fasteoi acpi
12: 102653 0 IO-APIC-edge i8042
16: 2777 0 IO-APIC-fasteoi ehci_hcd:usb1,
uhci_hcd:usb2, ath9k, i915
17: 0 0 IO-APIC-fasteoi uhci_hcd:usb3
18: 0 0 IO-APIC-fasteoi uhci_hcd:usb4
19: 0 0 IO-APIC-fasteoi uhci_hcd:usb5
44: 22184 0 PCI-MSI-edge ahci
45: 16167 0 PCI-MSI-edge eth0
46: 245 0 PCI-MSI-edge snd_hda_intel
Hmm, well I have 3 USB ports... what are the rest for? Well, the others
are used for other built in peripherals like web cam and SD reader. So I
looked at dmesg to see what USB port my Audio IF was. USB2 as it turns
out, so I reordered things to:
rtc snd usb2 usb i8042
irq/16-ehci_hcd 80
irq/16-uhci_hcd 79
irq/17-uhci_hcd 74
irq/18-uhci_hcd 73
irq/19-uhci_hcd 72
irq/12-i8042 69
irq/1-i8042 70
irq/8-rtc0 90
irq/16-ath9k 78
irq/16-i915 77
irq/46-snd_hda_ 85
Hmm, ehci (USB1) is now 80, higher than USB2 (79). It seems that rtirq
does priority by irq number. Looking at cat /proc/interrupts again I can
see that 16: ehci_hcd:usb1, uhci_hcd:usb2, ath9k, i915 has lots of stuff
on it. maybe USB2 is not so good to use... So I plugged the IF into each
socket and was surprised to learn that the other two sockets were both
usb3 (3:0 and 3:1). But at least USB3 is on it's own irq lets try that.
Also, seeing as when I am using a USB IF I don't need internal sound I
move that lower too:
rtc usb3 snd i8042 usb
irq/16-ehci_hcd 80
irq/16-uhci_hcd 70
irq/17-uhci_hcd 85
irq/18-uhci_hcd 68
irq/19-uhci_hcd 67
irq/12-i8042 74
irq/1-i8042 75
irq/8-rtc0 90
irq/16-ath9k 78
irq/16-i915 77
irq/46-snd_hda_ 80
Now my USB IF is higher than all the other USBs and the performance is
back where it should be even when the usb drive is in USB2. I have to
remember that the two usb ports on the right side of my computer are the
same one. I have learned that it does matter what usb port I use. It is
worth while finding out which port is which. So what are all the rest?
USB1 = any port which has a USB 2.0 device.
USB2 = left port
USB3 = two right ports
USB 4&5 ? I don't know, Maybe the standard USB chip comes with 5 ports and
they only used 3. Webcam and SD use USB1.
Len
--
Len Ovens
www.OvenWerks.net
More information about the Ubuntu-Studio-devel
mailing list