How much RT optimization is still needed?

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

User avatar
turbidh20
Established Member
Posts: 129
Joined: Sun Aug 04, 2019 12:48 pm
Location: UK

Re: How much RT optimization is still needed?

Post by turbidh20 »

I think I stopped using swap when I went from 2 to 4 GB RAM around 11 years ago! I currently have 16. Definitely use it as an insurance policy though if you feel the need. No harm in that at all :D
Arch Linux (i7-4790k/GTX970); UMC204HD; MPK Mini MKII; Jack2 (QjackCtl) & Ardour/Mixbus

merlyn
Established Member
Posts: 660
Joined: Thu Oct 11, 2018 4:13 pm

Re: How much RT optimization is still needed?

Post by merlyn »

turbidh20 wrote:to clarify - using xhci puts all 9 USB 3 IRQs at the top! This would appear to be a drawback
If you get less Xruns it doesn't seem to be a drawback. Are your other USB devices on 'ehci'?

Your experience would suggest rtirq can go into the 'essential' category of tweaks.

User avatar
turbidh20
Established Member
Posts: 129
Joined: Sun Aug 04, 2019 12:48 pm
Location: UK

Re: How much RT optimization is still needed?

Post by turbidh20 »

merlyn wrote:
Thu Jul 30, 2020 10:40 am
turbidh20 wrote:to clarify - using xhci puts all 9 USB 3 IRQs at the top! This would appear to be a drawback
If you get less Xruns it doesn't seem to be a drawback. Are your other USB devices on 'ehci'?
I use all my USB ports, so I also have stuff on 'ehci' but I don't need to prioritise that as my 204HD is in a USB 3 port.
merlyn wrote:
Thu Jul 30, 2020 10:40 am
Your experience would suggest rtirq can go into the 'essential' category of tweaks.
Absolutely! I think this is going to be slightly different though, depending on the specific motherboard involved. I'm guessing the USB implementation is highly dependent on MB vendor.

In my case my 204HD is reported to be on IRQ 18 but this appears to be irrelevant as I need xhci prioritised or massive xruns. And then you can't prioritise the order of the IRQs which means I get IRQ 46 at the top, which is powering things like mouse and keyboard. The weird thing is I'm getting IRQ 47 running hottest (above jackd even), so is this the one actually associated with my 204HD? I can find no record of anything attached to IRQ 47! It's all black magic :D

This is my 'rtirq status'...

Code: Select all

    
    PID CLS RTPRIO  NI PRI %CPU STAT COMMAND	
    550 FF      90   - 130  0.0 S    irq/18-i801_smb	
    253 FF      85   - 125  0.1 S    irq/46-xhci_hcd	
    256 FF      84   - 124  3.6 S    irq/47-xhci_hcd	
    257 FF      83   - 123  0.0 S    irq/48-xhci_hcd	
    258 FF      82   - 122  0.0 S    irq/49-xhci_hcd	
    259 FF      81   - 121  0.0 S    irq/50-xhci_hcd	
    260 FF      80   - 120  0.0 S    irq/51-xhci_hcd	
    261 FF      79   - 119  0.0 S    irq/52-xhci_hcd	
    262 FF      78   - 118  0.0 S    irq/53-xhci_hcd	
    263 FF      77   - 117  0.0 S    irq/54-xhci_hcd	
    123 FF      50   -  90  0.0 S    irq/9-acpi	
    141 FF      50   -  90  0.0 S    irq/34-nvme0q0	
    142 FF      50   -  90  0.0 S    irq/36-nvme0q1	
    143 FF      50   -  90  0.0 S    irq/37-nvme0q2	
    144 FF      50   -  90  0.0 S    irq/38-nvme0q3	
    145 FF      50   -  90  0.0 S    irq/39-nvme0q4	
    146 FF      50   -  90  0.0 S    irq/40-nvme0q5	
    147 FF      50   -  90  0.0 S    irq/41-nvme0q6	
    148 FF      50   -  90  0.0 S    irq/42-nvme0q7	
    149 FF      50   -  90  0.0 S    irq/43-nvme0q8	
    150 FF      50   -  90  0.0 S    irq/35-ahci[000	
    166 FF      50   -  90  0.0 S    irq/44-ahci[000	
    173 FF      50   -  90  0.0 S    irq/45-ahci[000	
    180 FF      50   -  90  0.0 S    irq/8-rtc0	
    247 FF      50   -  90  0.0 S    irq/16-firewire	
    248 FF      50   -  90  0.0 S    irq/16-ehci_hcd	
    254 FF      50   -  90  0.0 S    irq/23-ehci_hcd	
    553 FF      50   -  90  0.0 S    irq/56-mei_me	
   1079 FF      50   -  90  0.2 S    irq/57-nvidia	
   1080 FF      49   -  89  0.5 S    irq/57-s-nvidia	
      9 TS       -   0  19  0.1 S    ksoftirqd/0	
     21 TS       -   0  19  0.0 S    ksoftirqd/1	
     28 TS       -   0  19  0.0 S    ksoftirqd/2	
     35 TS       -   0  19  0.0 S    ksoftirqd/3	
     42 TS       -   0  19  0.1 S    ksoftirqd/4	
     49 TS       -   0  19  0.0 S    ksoftirqd/5	
     56 TS       -   0  19  0.1 S    ksoftirqd/6	
     63 TS       -   0  19  0.1 S    ksoftirqd/7	
Arch Linux (i7-4790k/GTX970); UMC204HD; MPK Mini MKII; Jack2 (QjackCtl) & Ardour/Mixbus

merlyn
Established Member
Posts: 660
Joined: Thu Oct 11, 2018 4:13 pm

Re: How much RT optimization is still needed?

Post by merlyn »

I think i801_smb may not have anything to do with your soundcard. Is it the System Management Bus? Have you tried deleting i801_smb in rtirq.conf?

User avatar
turbidh20
Established Member
Posts: 129
Joined: Sun Aug 04, 2019 12:48 pm
Location: UK

Re: How much RT optimization is still needed?

Post by turbidh20 »

merlyn wrote:
Thu Jul 30, 2020 4:09 pm
I think i801_smb may not have anything to do with your soundcard. Is it the System Management Bus? Have you tried deleting i801_smb in rtirq.conf?
I mentioned it in a previous post :) It appears to work the same whether it's in or not, as long as xhci is in.

The only reason I've left it in is because my card is assigned to its IRQ - 18. Like I said, it's all voodoo!
Arch Linux (i7-4790k/GTX970); UMC204HD; MPK Mini MKII; Jack2 (QjackCtl) & Ardour/Mixbus

merlyn
Established Member
Posts: 660
Joined: Thu Oct 11, 2018 4:13 pm

Re: How much RT optimization is still needed?

Post by merlyn »

turbidh20 wrote: The only reason I've left it in is because my card is assigned to its IRQ - 18.
Where are you getting that? If I use cat /proc/interrupts it doesn't tell me what devices are on the USB bus. If you have JACK running then yes, the interrupt at the top is the soundcard. top shows this :

Code: Select all

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                               
    363 root     -96   0       0      0      0 S   6.3   0.0   0:02.80 irq/20-snd_ice1                                                                                       
   8597 merlyn    20   0  248684  96368  88820 S   5.3   0.9   0:02.49 jackdbus                                                                                              
      9 root      20   0       0      0      0 R   2.0   0.0   0:19.18 ksoftirqd/0                                                                                           
   1264 merlyn    20   0 1087772 125276  81872 S   0.7   1.1   3:03.28 Xorg                                                                                                  
   5532 merlyn    20   0 2786848 314364 117852 S   0.7   2.8   1:58.49 Web Content                                                                                           
   5581 merlyn    20   0 2770776 297888 153372 S   0.7   2.7   2:13.52 Web Content                                                                                           
    370 root     -51   0       0      0      0 S   0.3   0.0   0:31.80 irq/30-radeon 
The lower the JACK buffer the higher the CPU for the interrupt. The terminal output above is with only JACK running with a buffer size of 16 -- no JACK apps and it's already at 6.3% CPU.

User avatar
turbidh20
Established Member
Posts: 129
Joined: Sun Aug 04, 2019 12:48 pm
Location: UK

Re: How much RT optimization is still needed?

Post by turbidh20 »

merlyn wrote:
Thu Jul 30, 2020 6:05 pm
turbidh20 wrote: The only reason I've left it in is because my card is assigned to its IRQ - 18.
Where are you getting that? If I use cat /proc/interrupts it doesn't tell me what devices are on the USB bus.
Find the soundcard ->

Code: Select all

lsusb
Bus 005 Device 002: ID 1397:0508 BEHRINGER International GmbH UMC204HD 192k
Locate iSerial on the root of Bus 005 (Device 001) ->

Code: Select all

sudo lsusb -v
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  iSerial                 1 0000:0a:00.0
Find the controller with iSerial 0a:00.0 ->

Code: Select all

sudo lspci -v
0a:00.0 USB controller: ASMedia Technology Inc. ASM1042A USB 3.0 Host Controller (prog-if 30 [XHCI])
	Subsystem: ASRock Incorporation Device 1142
	Flags: bus master, fast devsel, latency 0, IRQ 18
	Memory at ef400000 (64-bit, non-prefetchable) [size=32K]
	Capabilities: [50] MSI: Enable- Count=1/8 Maskable- 64bit+
	Capabilities: [68] MSI-X: Enable+ Count=8 Masked-
	Capabilities: [78] Power Management version 3
	Capabilities: [80] Express Legacy Endpoint, MSI 00
	Capabilities: [100] Virtual Channel
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci
Which gives IRQ 18 and driver xhci_hcd.

Code: Select all

rtirq status

    PID CLS RTPRIO  NI PRI %CPU STAT COMMAND	
    479 FF      90   - 130  0.0 S    irq/18-i801_smb	
    260 FF      85   - 125  0.1 S    irq/46-xhci_hcd	
    262 FF      84   - 124  3.5 S    irq/47-xhci_hcd	
    263 FF      83   - 123  0.0 S    irq/48-xhci_hcd	
    264 FF      82   - 122  0.0 S    irq/49-xhci_hcd	
    265 FF      81   - 121  0.0 S    irq/50-xhci_hcd	
    266 FF      80   - 120  0.0 S    irq/51-xhci_hcd	
    267 FF      79   - 119  0.0 S    irq/52-xhci_hcd	
    268 FF      78   - 118  0.0 S    irq/53-xhci_hcd	
    269 FF      77   - 117  0.0 S    irq/54-xhci_hcd	
As you can see, IRQ 47 is the busiest, even though I can find nothing immediately attached to it. So, as I previously alluded to, i801_smb seems superfluous even though my card is assigned IRQ 18. IRQ 46 has keyboard and mouse, so that's showing slight activity as well.
Arch Linux (i7-4790k/GTX970); UMC204HD; MPK Mini MKII; Jack2 (QjackCtl) & Ardour/Mixbus

merlyn
Established Member
Posts: 660
Joined: Thu Oct 11, 2018 4:13 pm

Re: How much RT optimization is still needed?

Post by merlyn »

My USB controllers are on IRQ 18 too according to lspci. I notice your IRQ 18 is using 0% CPU -- so it could be used only for initialisation, or when connecting a device. I would think it's safe to leave it out of rtirq.conf.

I have been reading through the Ardour thread, and x42 pretty much gives instructions on what to delete on the wiki.

I also came across a tweak I'd never heard of -- it came up in a discussion of 'to swap or not to swap' and it was disabling the systemd journal. Less disk writes, also the systemd journal takes up space. It's done by editing /etc/systemd/journald.conf with this :

Code: Select all

[Journal]
Storage=none
You need to uncomment that line, and change it to 'none' from 'auto'.

User avatar
turbidh20
Established Member
Posts: 129
Joined: Sun Aug 04, 2019 12:48 pm
Location: UK

Re: How much RT optimization is still needed?

Post by turbidh20 »

merlyn wrote:
Fri Jul 31, 2020 5:43 pm
I also came across a tweak I'd never heard of -- it came up in a discussion of 'to swap or not to swap' and it was disabling the systemd journal.
I often look through the journal :wink: I don't run any DE, just a WM and a few bits like xsettingsd, so I'm running light enough not to need disabling that. Edit: I'm running on an NVME drive too, super fast.

It's a good idea of course in general to limit the background services to what you actually need. There are certain things like cupsd I only start when I want to print, for example.
Arch Linux (i7-4790k/GTX970); UMC204HD; MPK Mini MKII; Jack2 (QjackCtl) & Ardour/Mixbus

Post Reply