Standard test needed to benchmark XRUNs

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

windowsrefund
Established Member
Posts: 64
Joined: Mon Jul 30, 2018 11:04 pm

Re: Standard test needed to benchmark XRUNs

Post by windowsrefund »

Thanks for all the feedback thus far. After making some changes over here, I can reproduce a set of results that seem to be an improvement over what I previously mentioned.

With Jack Periods set to 2

Code: Select all

time bin/xruncounter 
Samplerate 48000 
Buffersize is 512 
jack running with realtime priority
Xrun 1 at DSP load 81.481308
Xrun 2 at DSP load 86.754990
Xrun 3 at DSP load 92.727966
Xrun 4 at DSP load 92.679642
Xrun 5 at DSP load 96.514267
in complete 5 Xruns in 43666 circles
first Xrun happen at DSP load 81.481308 circle 41250

real	7m45.844s
With Jack Periods set to 3

Code: Select all

time bin/xruncounter 
Samplerate 48000 
Buffersize is 512 
jack running with realtime priority
Xrun 1 at DSP load 93.284630
Xrun 2 at DSP load 93.284630
Xrun 3 at DSP load 86.380264
Xrun 4 at DSP load 95.498962
Xrun 5 at DSP load 97.668900
in complete 5 Xruns in 44023 circles
first Xrun happen at DSP load 93.284630 circle 43342

real	7m49.652s
user	3m22.240s
sys	0m0.183s
So I guess I'll be going with a buffersize of 512 with 3 periods. Still not sure what the periods actually translate to but I suppose I can read about it for the zillionth time and maybe it'll click.
User avatar
lilith
Established Member
Posts: 1698
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 117 times
Been thanked: 57 times
Contact:

Re: Standard test needed to benchmark XRUNs

Post by lilith »

This is how it looks for me... not that good :/ All with Periods / Buffer = 3. It's getting even worth with 2.

Code: Select all

Samplerate 48000 
Buffersize is 128 
jack running with realtime priority
Xrun 1 at DSP load 65.820045
Xrun 2 at DSP load 65.820045
Xrun 3 at DSP load 66.820053
Xrun 4 at DSP load 66.268242
Xrun 5 at DSP load 67.035927
Xrun 6 at DSP load 66.713760
....

Code: Select all

Samplerate 48000 
Buffersize is 512 
jack running with realtime priority
Xrun 1 at DSP load 83.043152
Xrun 2 at DSP load 84.857880
Xrun 3 at DSP load 90.829849
Xrun 4 at DSP load 84.346046
Xrun 5 at DSP load 84.346046
Xrun 6 at DSP load 84.977722
Xrun 7 at DSP load 87.273224
Xrun 8 at DSP load 87.273224
Xrun 9 at DSP load 93.636612
Xrun 10 at DSP load 87.798332
Xrun 11 at DSP load 87.798332
Xrun 12 at DSP load 87.688850
Xrun 13 at DSP load 86.723923
Xrun 14 at DSP load 86.971741
Xrun 15 at DSP load 86.971741
Xrun 16 at DSP load 87.524261
Xrun 17 at DSP load 90.716614
Xrun 18 at DSP load 88.106293
Xrun 19 at DSP load 88.106293
Xrun 20 at DSP load 86.870468
Xrun 21 at DSP load 86.870468
Xrun 22 at DSP load 84.987831
Xrun 23 at DSP load 84.987831
Xrun 24 at DSP load 93.224739
Xrun 25 at DSP load 88.040756
Xrun 26 at DSP load 88.040756
Xrun 27 at DSP load 88.040756
Xrun 28 at DSP load 88.040756
Xrun 29 at DSP load 94.020378
Xrun 30 at DSP load 94.020378
Xrun 31 at DSP load 94.020378
Xrun 32 at DSP load 94.020378
Xrun 33 at DSP load 94.020378
Xrun 34 at DSP load 94.210831
Xrun 35 at DSP load 94.210831
Xrun 36 at DSP load 95.815033
Xrun 37 at DSP load 90.777382
Xrun 38 at DSP load 90.777382
Xrun 39 at DSP load 95.498116
Xrun 40 at DSP load 96.689621
in complete 40 Xruns in 44485 circles
first Xrun happen at DSP load 83.043152 circle 41055

Code: Select all

CPU:       Quad core Intel Core i5-4460 (-MCP-) cache: 6144 KB 
           clock speeds: max: 3400 MHz 1: 3320 MHz 2: 3344 MHz 3: 3352 MHz
           4: 3395 MHz
           CPU Flags: abm acpi aes aperfmperf apic arat arch_perfmon avx avx2
           bmi1 bmi2 bts clflush cmov constant_tsc cx16 cx8 de ds_cpl dtes64
           dtherm dts ept erms est f16c flexpriority flush_l1d fma fpu
           fsgsbase fxsr ht ibpb ibrs ida invpcid invpcid_single kaiser
           lahf_lm lm mca mce mmx monitor movbe msr mtrr nonstop_tsc nopl nx
           pae pat pbe pcid pclmulqdq pdcm pdpe1gb pebs pge pln pni popcnt pse
           pse36 pts rdrand rdtscp rep_good sdbg sep smep ss ssbd sse sse2
           sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow tsc tsc_adjust
           tsc_deadline_timer vme vmx vnmi vpid x2apic xsave xsaveopt
           xtopology xtpr

Code: Select all

perl -I ./ ./realTimeConfigQuickScan.pl
== GUI-enabled checks ==
Checking if you are root... no - good
Checking filesystem 'noatime' parameter... 4.9.0 kernel - good
(relatime is default since 2.6.30)
Checking CPU Governors... CPU 0: 'performance' CPU 1: 'performance' CPU 2: 'performance' CPU 3: 'performance'  - good
Checking swappiness... 10 - good
Checking for resource-intensive background processes... none found - good
Checking checking sysctl inotify max_user_watches... < 524288 - not good
increase max_user_watches by adding 'fs.inotify.max_user_watches = 524288' to /etc/sysctl.conf and rebooting
For more information, see http://wiki.linuxaudio.org/wiki/system_configuration#sysctlconf
Checking access to the high precision event timer... readable - good
Checking access to the real-time clock... readable - good
Checking whether you're in the 'audio' group... yes - good
Checking for multiple 'audio' groups... no - good
Checking the ability to prioritize processes with chrt... yes - good
Checking kernel support for high resolution timers... found - good
Kernel with Real-Time Preemption... found - good
Checking if kernel system timer is high-resolution... found - good
Checking kernel support for tickless timer... found - good
== Other checks ==
Checking filesystem types... ok.
not found.
** Warning: no tmpfs partition mounted on /tmp
   For more information, see:
   - http://wiki.linuxaudio.org/wiki/system_configuration#tmpfs
   - http://lowlatency.linuxaudio.org
** Set $SOUND_CARD_IRQ to the IRQ of your soundcard to enable more checks.
   Find your sound card's IRQ by looking at '/proc/interrupts' and lspci.
Soundcard: Zoom R8
User avatar
lilith
Established Member
Posts: 1698
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 117 times
Been thanked: 57 times
Contact:

Re: Standard test needed to benchmark XRUNs

Post by lilith »

I did all the optimizations, so I really wonder why it is that bad.
Jack Winter wrote:
lilith wrote:I have a test running with the RT kernel and discussed the results with JackWinter at IRC. There is obviously no problem. My maximum latency is 50 microseconds even with 100% CPU usage.
Then the RT kernel is doing it's job well.
Drumfix
Established Member
Posts: 299
Joined: Mon Jan 26, 2009 5:15 pm
Been thanked: 11 times

Re: Standard test needed to benchmark XRUNs

Post by Drumfix »

I guess the Zoom is a USB interface that uses isochronous asynchronous audio endpoints.
Due to the broken design of jack and all major DAWs, even when using alsa (= allowing only fixed size buffers), this cannot work with such devices.
The same design error also exists in ASIO/WIndows and is the reason why the USB drivers in WIn require big internal safety buffers.

The irony. Alsa actually provides the real (variable) number of samples to process, the plugin's process routines (Vst, Ladspa, LV2 and even jack) provide a parameter containing the number of samples to process, but the DAW hosts and jack all only process buffers with a fixed number of samples. :roll:
User avatar
raboof
Established Member
Posts: 1855
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 50 times
Been thanked: 74 times
Contact:

Re: Standard test needed to benchmark XRUNs

Post by raboof »

Drumfix wrote:I guess the Zoom is a USB interface that uses isochronous asynchronous audio endpoints.
Due to the broken design of jack and all major DAWs, even when using alsa (= allowing only fixed size buffers), this cannot work with such devices.

The irony. Alsa actually provides the real (variable) number of samples to process, the plugin's process routines (Vst, Ladspa, LV2 and even jack) provide a parameter containing the number of samples to process, but the DAW hosts and jack all only process buffers with a fixed number of samples.
This is interesting, and I'd like to know more. Could you explain a bit further what this means and what ALSA API's allow you to take advantage of this (in contrast to Jack)? Do you have a device that supports this, and have you been able to perform any benchmarks?

https://www.zoom-na.com/products/produc ... er-sampler suggests the Zoom R8 has USB 2.0, though, and since AFAICS isochronous asynchronous audio endpoints were introduced in USB 3.1 I'd say this does not have anything to do with the problem lilith is facing.
User avatar
lilith
Established Member
Posts: 1698
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 117 times
Been thanked: 57 times
Contact:

Re: Standard test needed to benchmark XRUNs

Post by lilith »

The Zoom also has an USB 1.0 option. I checked USB 2.0 and 1.0 and the results are the same.

Here's the outcome with the new realtimeconfigscript:

Code: Select all

== GUI-enabled checks ==
Checking if you are root... no - good
Checking filesystem 'noatime' parameter... 4.9.0 kernel - good
(relatime is default since 2.6.30)
Checking CPU Governors... CPU 0: 'performance' CPU 1: 'performance' CPU 2: 'performance' CPU 3: 'performance'  - good
Checking swappiness... 10 - good
Checking for resource-intensive background processes... none found - good
Checking checking sysctl inotify max_user_watches... < 524288 - not good
increase max_user_watches by adding 'fs.inotify.max_user_watches = 524288' to /etc/sysctl.conf and rebooting
For more information, see http://wiki.linuxaudio.org/wiki/system_configuration#sysctlconf
Checking access to the high precision event timer... readable - good
Checking access to the real-time clock... readable - good
Checking whether you're in the 'audio' group... yes - good
Checking for multiple 'audio' groups... no - good
Checking the ability to prioritize processes with chrt... yes - good
Checking kernel support for high resolution timers... found - good
Kernel with Real-Time Preemption... found - good
Checking if kernel system timer is high-resolution... found - good
Checking kernel support for tickless timer... found - good
== Other checks ==
Checking filesystem types... ok.
** Set $SOUND_CARD_IRQ to the IRQ of your soundcard to enable more checks.
   Find your sound card's IRQ by looking at '/proc/interrupts' and lspci.
User avatar
lilith
Established Member
Posts: 1698
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 117 times
Been thanked: 57 times
Contact:

Re: Standard test needed to benchmark XRUNs

Post by lilith »

I tried with the Debian stock kernel and it's slightly better (maybe the same within the reproducibility)

Code: Select all

 ./xruncounter
Samplerate 48000 
Buffersize is 512 
jack running with realtime priority
Xrun 1 at DSP load 87.472519
Xrun 2 at DSP load 86.831139
Xrun 3 at DSP load 87.771721
Xrun 4 at DSP load 89.329102
Xrun 5 at DSP load 89.329102
Xrun 6 at DSP load 89.813240
Xrun 7 at DSP load 87.799927
Xrun 8 at DSP load 87.136093
Xrun 9 at DSP load 92.981163
Xrun 10 at DSP load 94.404510
Xrun 11 at DSP load 89.506485
Xrun 12 at DSP load 89.506485
Xrun 13 at DSP load 89.506485
Xrun 14 at DSP load 87.519646
Xrun 15 at DSP load 88.038727
Xrun 16 at DSP load 93.634918
Xrun 17 at DSP load 93.634918
Xrun 18 at DSP load 89.056580
Xrun 19 at DSP load 89.056580
Xrun 20 at DSP load 90.794991
Xrun 21 at DSP load 90.794991
Xrun 22 at DSP load 87.906403
Xrun 23 at DSP load 93.492287
Xrun 24 at DSP load 90.141037
Xrun 25 at DSP load 90.141037
Xrun 26 at DSP load 90.141037
Xrun 27 at DSP load 93.959511
Xrun 28 at DSP load 90.885620
Xrun 29 at DSP load 93.164543
Xrun 30 at DSP load 94.721222
Xrun 31 at DSP load 94.721222
Xrun 32 at DSP load 89.892960
Xrun 33 at DSP load 89.892960
Xrun 34 at DSP load 89.892960
Xrun 35 at DSP load 86.447510
Xrun 36 at DSP load 86.447510
Xrun 37 at DSP load 91.658035
Xrun 38 at DSP load 93.191559
Xrun 39 at DSP load 93.191559
Xrun 40 at DSP load 94.636284
Xrun 41 at DSP load 94.636284
Xrun 42 at DSP load 94.636284
Xrun 43 at DSP load 94.636284
Xrun 44 at DSP load 94.636284
Xrun 45 at DSP load 94.636284
Xrun 46 at DSP load 95.972748
Xrun 47 at DSP load 95.972748
Xrun 48 at DSP load 96.514404
in complete 48 Xruns in 42017 circles
first Xrun happen at DSP load 87.472519 circle 40284
Drumfix
Established Member
Posts: 299
Joined: Mon Jan 26, 2009 5:15 pm
Been thanked: 11 times

Re: Standard test needed to benchmark XRUNs

Post by Drumfix »

raboof wrote:and since AFAICS isochronous asynchronous audio endpoints were introduced in USB 3.1 I'd say this does not have anything to do with the problem lilith is facing.
I think you mix up fullduplex operation, that was introduced with USB 3.0 with the synchronization types that are part of the USB spec since V1.

Simply run lsusb -v, and have a look at the reported isochronous descriptors.

I have two USB2 devices: a JD-Xi and a Motu 16A. Both use isochronous/asynchronous endpoints with implicit feedback synchronization.

Synchronous USB2 devices at 48 kHz should produce exactly 6 sample/per channel every 125 microseconds, i.e. 48 Samples/1 millisecond.
So setting jack to 48kHz, buffersize a multiple of 48, 2 buffers should result in a DSP load before xruns of 98-99%.
User avatar
lilith
Established Member
Posts: 1698
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 117 times
Been thanked: 57 times
Contact:

Re: Standard test needed to benchmark XRUNs

Post by lilith »

Indeed this seems to be the case, if that's the crucial line:

Code: Select all

Transfer Type            Isochronous

I never heard of this and that it can make such a difference. What about the Focusrites USB interfaces? Thanks for clearifying this.

Code: Select all

Bus 003 Device 002: ID 1686:014f ZOOM Corporation 
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x1686 ZOOM Corporation
  idProduct          0x014f 
  bcdDevice            1.00
  iManufacturer           1 
  iProduct                2 
  iSerial                 3 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          294
    bNumInterfaces          5
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      1 Control Device
      bInterfaceProtocol      0 
      iInterface              4 
      AudioControl Interface Descriptor:
        bLength                10
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               1.00
        wTotalLength           62
        bInCollection           2
        baInterfaceNr( 0)       1
        baInterfaceNr( 1)       2
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bNrChannels             2
        wChannelConfig     0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames           0 
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             2
        wTerminalType      0x0201 Microphone
        bAssocTerminal          0
        bNrChannels             2
        wChannelConfig     0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames           0 
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             3
        wTerminalType      0x0301 Speaker
        bAssocTerminal          0
        bSourceID               5
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             4
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID               2
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                10
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                 5
        bSourceID               1
        bControlSize            1
        bmaControls( 0)      0x01
          Mute Control
        bmaControls( 1)      0x02
          Volume Control
        bmaControls( 2)      0x02
          Volume Control
        iFeature                0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0 
      iInterface              4 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0 
      iInterface              4 
      AudioStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           1
        bDelay                  1 frames
        wFormatTag              1 PCM
      AudioStreaming Interface Descriptor:
        bLength                20
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             2
        bSubframeSize           3
        bBitResolution         24
        bSamFreqType            4 Discrete
        tSamFreq[ 0]        44100
        tSamFreq[ 1]        48000
        tSamFreq[ 2]        88200
        tSamFreq[ 3]        96000
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            9
          Transfer Type            Isochronous
          Synch Type               Adaptive
          Usage Type               Data
        wMaxPacketSize     0x0240  1x 576 bytes
        bInterval               4
        bRefresh                0
        bSynchAddress           0
        AudioControl Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x01
            Sampling Frequency
          bLockDelayUnits         0 Undefined
          wLockDelay              0 Undefined
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0 
      iInterface              4 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0 
      iInterface              4 
      AudioStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           4
        bDelay                  1 frames
        wFormatTag              1 PCM
      AudioStreaming Interface Descriptor:
        bLength                20
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             2
        bSubframeSize           3
        bBitResolution         24
        bSamFreqType            4 Discrete
        tSamFreq[ 0]        44100
        tSamFreq[ 1]        48000
        tSamFreq[ 2]        88200
        tSamFreq[ 3]        96000
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            9
          Transfer Type            Isochronous
          Synch Type               Adaptive
          Usage Type               Data
        wMaxPacketSize     0x0240  1x 576 bytes
        bInterval               4
        bRefresh                0
        bSynchAddress           0
        AudioControl Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x01
            Sampling Frequency
          bLockDelayUnits         0 Undefined
          wLockDelay              0 Undefined
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      1 Control Device
      bInterfaceProtocol      0 
      iInterface              0 
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               1.00
        wTotalLength            9
        bInCollection           1
        baInterfaceNr( 0)       4
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        4
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         1 Audio
      bInterfaceSubClass      3 MIDI Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      MIDIStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               1.00
        wTotalLength           37
      MIDIStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (MIDI_IN_JACK)
        bJackType               1 Embedded
        bJackID                10
        iJack                   0 
      MIDIStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (MIDI_IN_JACK)
        bJackType               2 External
        bJackID                30
        iJack                   0 
      MIDIStreaming Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (MIDI_OUT_JACK)
        bJackType               1 Embedded
        bJackID                20
        bNrInputPins            1
        baSourceID( 0)         30
        BaSourcePin( 0)         1
        iJack                   0 
      MIDIStreaming Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (MIDI_OUT_JACK)
        bJackType               2 External
        bJackID                40
        bNrInputPins            1
        baSourceID( 0)         10
        BaSourcePin( 0)         1
        iJack                   0 
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
        bRefresh                0
        bSynchAddress           0
        MIDIStreaming Endpoint Descriptor:
          bLength                 5
          bDescriptorType        37
          bDescriptorSubtype      1 (GENERAL)
          bNumEmbMIDIJack         1
          baAssocJackID( 0)      10
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
        bRefresh                0
        bSynchAddress           0
        MIDIStreaming Endpoint Descriptor:
          bLength                 5
          bDescriptorType        37
          bDescriptorSubtype      1 (GENERAL)
          bNumEmbMIDIJack         1
          baAssocJackID( 0)      20
User avatar
raboof
Established Member
Posts: 1855
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 50 times
Been thanked: 74 times
Contact:

Re: Standard test needed to benchmark XRUNs

Post by raboof »

Drumfix wrote:I guess the Zoom is a USB interface that uses isochronous asynchronous audio endpoints.
Due to the broken design of jack and all major DAWs, even when using alsa (= allowing only fixed size buffers), this cannot work with such devices.
Drumfix wrote:I have two USB2 devices: a JD-Xi and a Motu 16A. Both use isochronous/asynchronous endpoints with implicit feedback synchronization.
Right, "Transfer Type: Isochronous" should be fairly common in USB audio devices, right? My Edirol UA-23ex also uses this mode. While I would still be interested in how you think you could get more performance out of this than the JACK design allows, it is unlikely to be the cause of the problems lilith is seeing since many of those cards work just (relatively speaking) fine? For example for mine:

Code: Select all

jackd 0.125.0rc1
Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details

JACK compiled with System V SHM support.
loading driver ..
apparent rate = 44100
creating alsa driver ... hw:UA25EX|hw:UA25EX|128|3|44100|0|0|nomon|swmeter|-|32bit
configuring for 44100Hz, period = 128 frames (2.9 ms), buffer = 3 periods
ALSA: final selected sample format for capture: 16bit little-endian
ALSA: use 3 periods for capture
ALSA: final selected sample format for playback: 16bit little-endian
ALSA: use 3 periods for playback
Samplerate 44100
Buffersize is 128
jack running with realtime priority
Xrun 1 at DSP load 95.563461
Xrun 2 at DSP load 95.563461
Xrun 3 at DSP load 95.563461
Xrun 4 at DSP load 95.563461
Xrun 5 at DSP load 97.857094
in complete 5 Xruns in 10724 circles
first Xrun happen at DSP load 95.563461 circle 9895
jack main caught signal 12
Drumfix
Established Member
Posts: 299
Joined: Mon Jan 26, 2009 5:15 pm
Been thanked: 11 times

Re: Standard test needed to benchmark XRUNs

Post by Drumfix »

You are using 3 periods instead of 2. That is that extra buffer needed by jack i am talking about.

Btw lillith's Zoom uses isochronous-adaptive endpoints, not isochronous-asynchronous ones.
User avatar
lilith
Established Member
Posts: 1698
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 117 times
Been thanked: 57 times
Contact:

Re: Standard test needed to benchmark XRUNs

Post by lilith »

Drumfix wrote:You are using 3 periods instead of 2. That is that extra buffer needed by jack i am talking about.

Btw lillith's Zoom uses isochronous-adaptive endpoints, not isochronous-asynchronous ones.
So is it due to my interface now or do I have a problem somewhere else?
User avatar
raboof
Established Member
Posts: 1855
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 50 times
Been thanked: 74 times
Contact:

Re: Standard test needed to benchmark XRUNs

Post by raboof »

Drumfix wrote:You are using 3 periods instead of 2.
Ah right, yes, that is definitely a factor that makes an enormous difference. With 2 periods per buffer, indeed I get much lower numbers:

Code: Select all

jackd 0.125.0rc1
Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details

JACK compiled with System V SHM support.
loading driver ..
apparent rate = 44100
creating alsa driver ... hw:UA25EX|hw:UA25EX|128|2|44100|0|0|nomon|swmeter|-|32bit
configuring for 44100Hz, period = 128 frames (2.9 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 16bit little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 16bit little-endian
ALSA: use 2 periods for playback
Samplerate 44100
Buffersize is 128
jack running with realtime priority
DSP load 65.951294
Xrun 1 at DSP load 65.951294
DSP load 65.951294
Xrun 2 at DSP load 65.951294
Xrun 3 at DSP load 65.951294
(etc xruns galore)
lilith: are you running with 2 or 3 periods per buffer?
Drumfix wrote:That is that extra buffer needed by jack i am talking about.
How do you benchmark that you get better performance when using ALSA directly?
Drumfix wrote:Btw lillith's Zoom uses isochronous-adaptive endpoints, not isochronous-asynchronous ones.
Right, my UA-23ex also uses isochronous-adaptive for the output AFAICS.
User avatar
lilith
Established Member
Posts: 1698
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 117 times
Been thanked: 57 times
Contact:

Re: Standard test needed to benchmark XRUNs

Post by lilith »

lilith: are you running with 2 or 3 periods per buffer?
I used both and there was hardly any difference.
Drumfix
Established Member
Posts: 299
Joined: Mon Jan 26, 2009 5:15 pm
Been thanked: 11 times

Re: Standard test needed to benchmark XRUNs

Post by Drumfix »

Looking the endpoint descriptor of the Zomm, it sends/receives 1 isochronous packet every 1 millisecond, so it will work best at buffersizes that are an exact multiple of samplerate/1000, e.g. 48, 96 .. at 48000.
Post Reply