Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   64 Studio User (http://www.linux-archive.org/64-studio-user/)
-   -   ALSA MIDI latency test - was: opensource.com talk (http://www.linux-archive.org/64-studio-user/388885-alsa-midi-latency-test-opensource-com-talk.html)

Ralf Mardorf 06-21-2010 02:24 PM

ALSA MIDI latency test - was: opensource.com talk
 
Daniel James wrote:


For ALSA MIDI there is: http://github.com/koppi/alsa-midi-latency-test




64 Studio 3.0 ╬▓



$ git clone git://github.com/koppi/alsa-midi-latency-test.git

$ cd alsa-midi-latency-test

$ sudo apt-get update

$ sudo apt-get install debhelper autotools-dev automake libasound2-dev

┬*debhelper is already the newest version.

┬*autotools-dev is already the newest version.

┬*automake is already the newest version.

┬*libasound2-dev is already the newest version.

$ sh autogen.sh

$ ./configure

$ sudo checkinstall

┬*Done. The new package has been installed and saved to

┬*/usr/src/alsa-midi-latency-test/alsa-midi-latency_0.0.3-1git20100621_amd64.deb

$ sudo make clean

$ alsa-midi-latency-test -l

┬*Port┬*┬*┬* Client name┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬* Port name

┬*14:0┬*┬*┬* Midi Through┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬* Midi Through Port-0

┬*16:0┬*┬*┬* TerraTec EWX24/96┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬* TerraTec EWX24/96 MIDI

┬*20:0┬*┬*┬* USB Device 0x170b:0x11┬*┬*┬*┬*┬*┬*┬*┬*┬*┬* USB Device 0x170b:0x11 MIDI 1

$ alsa-midi-latency-test -i20:0 -o20:0

> alsa-midi-latency-test 0.0.3

> clock resolution: 0.000000001 s



> sampling 10000 midi latency values - please wait ...

> press Ctrl+C to abort test



sample; latency_ms; latency_ms_worst

┬*┬*┬*┬* 0;┬*┬*┬*┬*┬*┬* 1.80;┬*┬*┬*┬*┬*┬* 1.80┬*┬*┬*┬*

┬*┬*┬*┬* 2;┬*┬*┬*┬*┬*┬* 1.99;┬*┬*┬*┬*┬*┬* 1.99┬*┬*┬*┬*

┬*┬*┬*┬* 4;┬*┬*┬*┬*┬*┬* 3.14;┬*┬*┬*┬*┬*┬* 3.14┬*┬*┬*┬*

┬*┬*┬* 11;┬*┬*┬*┬*┬*┬* 3.41;┬*┬*┬*┬*┬*┬* 3.41┬*┬*┬*┬*

┬*┬*┬* 27;┬*┬*┬*┬*┬*┬* 5.16;┬*┬*┬*┬*┬*┬* 5.16┬*┬*┬*┬*

┬* 2845;┬*┬*┬*┬*┬*┬* 5.43;┬*┬*┬*┬*┬*┬* 5.43┬*┬*┬*┬*

┬* 3842;┬*┬*┬*┬*┬*┬* 5.62;┬*┬*┬*┬*┬*┬* 5.62┬*┬*┬*┬*

┬* 3853;┬*┬*┬*┬*┬*┬* 7.00;┬*┬*┬*┬*┬*┬* 7.00┬*┬*┬*┬*

┬* 9999;┬*┬*┬*┬*┬*┬* 1.96;┬*┬*┬*┬*┬*┬* 7.00┬*┬*┬*┬*

> done.



> latency distribution:

...

┬* 1.3 -┬* 1.4 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

┬* 1.4 -┬* 1.5 ms:┬*┬*┬*┬*┬*┬*┬* 5 #

┬* 1.5 -┬* 1.6 ms:┬*┬*┬*┬*┬*┬*┬* 6 #

┬* 1.6 -┬* 1.7 ms:┬*┬*┬*┬*┬*┬*┬* 8 #

┬* 1.7 -┬* 1.8 ms:┬*┬*┬*┬*┬*┬* 10 #

┬* 1.8 -┬* 1.9 ms:┬*┬*┬*┬*┬*┬* 50 #

┬* 1.9 -┬* 2.0 ms:┬*┬*┬*┬*┬* 229 #

┬* 2.0 -┬* 2.1 ms:┬*┬*┬*┬* 9570 ##################################################

┬* 2.1 -┬* 2.2 ms:┬*┬*┬*┬*┬*┬* 44 #

┬* 2.2 -┬* 2.3 ms:┬*┬*┬*┬*┬*┬* 33 #

┬* 2.3 -┬* 2.4 ms:┬*┬*┬*┬*┬*┬*┬* 9 #

┬* 2.4 -┬* 2.5 ms:┬*┬*┬*┬*┬*┬*┬* 4 #

┬* 2.5 -┬* 2.6 ms:┬*┬*┬*┬*┬*┬*┬* 5 #

┬* 2.6 -┬* 2.7 ms:┬*┬*┬*┬*┬*┬*┬* 2 #

┬* 2.7 -┬* 2.8 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

┬* 2.8 -┬* 2.9 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

┬* 2.9 -┬* 3.0 ms:┬*┬*┬*┬*┬*┬*┬* 2 #

┬* 3.0 -┬* 3.1 ms:┬*┬*┬*┬*┬*┬*┬* 2 #

┬* 3.1 -┬* 3.2 ms:┬*┬*┬*┬*┬*┬*┬* 2 #

┬* 3.2 -┬* 3.3 ms:┬*┬*┬*┬*┬*┬*┬* 2 #

┬* 3.3 -┬* 3.4 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

┬* 3.4 -┬* 3.5 ms:┬*┬*┬*┬*┬*┬*┬* 3 #

...

┬* 3.7 -┬* 3.8 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

┬* 3.8 -┬* 3.9 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

...

┬* 4.4 -┬* 4.5 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

...

┬* 5.0 -┬* 5.1 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

┬* 5.1 -┬* 5.2 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

┬* 5.2 -┬* 5.3 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

...

┬* 5.4 -┬* 5.5 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

...

┬* 5.6 -┬* 5.7 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

...

┬* 6.0 -┬* 6.1 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

...

┬* 7.0 -┬* 7.1 ms:┬*┬*┬*┬*┬*┬*┬* 1 #



> FAIL



┬*best latency was 1.29 ms

┬*worst latency was 7.00 ms, which is too much. Please check:



┬* - if your hardware uses shared IRQs - `watch -n 1 cat /proc/interrupts`

┬*┬*┬* while running this test to see, which IRQs the OS is using for your midi hardware,



┬* - if you're running this test on a realtime OS - `uname -a` should contain '-rt',



┬* - your OS' scheduling priorities - `chrt -p [pidof process name|IRQ-?]`.



┬*Have a look at

┬* http://www.linuxaudio.org/mailarchive/lat/

┬*to find out, howto fix issues with high midi latencies.

$ uname -a

Linux 64studio 2.6.31.12-rt20 #1 SMP PREEMPT RT Sun Feb 7 13:55:55 CET 2010 x86_64 GNU/Linux

$ alsa-midi-latency-test -i20:0 -o20:0

> alsa-midi-latency-test 0.0.3

> clock resolution: 0.000000001 s



> sampling 10000 midi latency values - please wait ...

> press Ctrl+C to abort test



sample; latency_ms; latency_ms_worst

┬*┬*┬*┬* 0;┬*┬*┬*┬*┬*┬* 2.12;┬*┬*┬*┬*┬*┬* 2.12┬*┬*┬*┬*

┬*┬*┬* 41;┬*┬*┬*┬*┬*┬* 2.29;┬*┬*┬*┬*┬*┬* 2.29┬*┬*┬*┬*

┬*┬*┬* 56;┬*┬*┬*┬*┬*┬* 3.21;┬*┬*┬*┬*┬*┬* 3.21┬*┬*┬*┬*

┬* 2252;┬*┬*┬*┬*┬*┬* 3.24;┬*┬*┬*┬*┬*┬* 3.24┬*┬*┬*┬*

┬* 2423;┬*┬*┬*┬*┬*┬* 3.35;┬*┬*┬*┬*┬*┬* 3.35┬*┬*┬*┬*

┬* 4748;┬*┬*┬*┬*┬*┬* 4.44;┬*┬*┬*┬*┬*┬* 4.44┬*┬*┬*┬*

┬* 6760;┬*┬*┬*┬*┬*┬* 5.10;┬*┬*┬*┬*┬*┬* 5.10┬*┬*┬*┬*

┬* 7872;┬*┬*┬*┬*┬* 15.41;┬*┬*┬*┬*┬* 15.41┬*┬*┬*┬*

┬* 9999;┬*┬*┬*┬*┬*┬* 1.99;┬*┬*┬*┬*┬* 15.41┬*┬*┬*┬*

> done.



> latency distribution:

...

┬* 1.3 -┬* 1.4 ms:┬*┬*┬*┬*┬*┬*┬* 2 #

┬* 1.4 -┬* 1.5 ms:┬*┬*┬*┬*┬*┬*┬* 6 #

┬* 1.5 -┬* 1.6 ms:┬*┬*┬*┬*┬*┬* 26 #

┬* 1.6 -┬* 1.7 ms:┬*┬*┬*┬*┬*┬* 12 #

┬* 1.7 -┬* 1.8 ms:┬*┬*┬*┬*┬*┬* 20 #

┬* 1.8 -┬* 1.9 ms:┬*┬*┬*┬*┬*┬* 21 #

┬* 1.9 -┬* 2.0 ms:┬*┬*┬*┬*┬* 280 #

┬* 2.0 -┬* 2.1 ms:┬*┬*┬*┬* 9508 ##################################################

┬* 2.1 -┬* 2.2 ms:┬*┬*┬*┬*┬*┬* 33 #

┬* 2.2 -┬* 2.3 ms:┬*┬*┬*┬*┬*┬* 18 #

┬* 2.3 -┬* 2.4 ms:┬*┬*┬*┬*┬*┬* 18 #

┬* 2.4 -┬* 2.5 ms:┬*┬*┬*┬*┬*┬* 12 #

┬* 2.5 -┬* 2.6 ms:┬*┬*┬*┬*┬*┬* 17 #

┬* 2.6 -┬* 2.7 ms:┬*┬*┬*┬*┬*┬*┬* 4 #

┬* 2.7 -┬* 2.8 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

┬* 2.8 -┬* 2.9 ms:┬*┬*┬*┬*┬*┬*┬* 3 #

┬* 2.9 -┬* 3.0 ms:┬*┬*┬*┬*┬*┬*┬* 2 #

┬* 3.0 -┬* 3.1 ms:┬*┬*┬*┬*┬*┬*┬* 3 #

┬* 3.1 -┬* 3.2 ms:┬*┬*┬*┬*┬*┬*┬* 2 #

┬* 3.2 -┬* 3.3 ms:┬*┬*┬*┬*┬*┬*┬* 2 #

┬* 3.3 -┬* 3.4 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

┬* 3.4 -┬* 3.5 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

┬* 3.5 -┬* 3.6 ms:┬*┬*┬*┬*┬*┬*┬* 2 #

┬* 3.6 -┬* 3.7 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

...

┬* 4.2 -┬* 4.3 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

...

┬* 4.4 -┬* 4.5 ms:┬*┬*┬*┬*┬*┬*┬* 2 #

...

┬* 5.1 -┬* 5.2 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

...

┬*15.4 - 15.5 ms:┬*┬*┬*┬*┬*┬*┬* 1 #



> FAIL



┬*best latency was 1.30 ms

┬*worst latency was 15.41 ms, which is too much. Please check:



┬* - if your hardware uses shared IRQs - `watch -n 1 cat /proc/interrupts`

┬*┬*┬* while running this test to see, which IRQs the OS is using for your midi hardware,



┬* - if you're running this test on a realtime OS - `uname -a` should contain '-rt',



┬* - your OS' scheduling priorities - `chrt -p [pidof process name|IRQ-?]`.



┬*Have a look at

┬* http://www.linuxaudio.org/mailarchive/lat/

┬*to find out, howto fix issues with high midi latencies.



64 Studio 3.3 ╬▒



$ su root -c "apt-get update"

$ su root -c "apt-get install git-core debhelper autotools-dev automake libasound2-dev"

debhelper is already the newest version.

autotools-dev is already the newest version.

automake is already the newest version.

libasound2-dev is already the newest version.

The following NEW packages will be installed:

┬*┬* git-core libdigest-sha1-perl liberror-perl

$ git clone git://github.com/koppi/alsa-midi-latency-test.git

$ cd alsa-midi-latency-test

$ su root -c "apt-get install libtool"

The following NEW packages will be installed:

┬*┬* libltdl-dev libtool

$ sh autogen.sh

$ ./configure

$ su root -c checkinstall

Done. The new package has been installed and saved to

/usr/src/alsa-midi-latency-test/alsa-midi-latency_0.0.3-1git20100621~3.3a_amd64.deb

$ su root -c "make clean"

$ alsa-midi-latency-test -l

Port┬*┬*┬* Client name┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬* Port name

14:0┬*┬*┬* Midi Through┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬* Midi Through Port-0

16:0┬*┬*┬* TerraTec EWX24/96┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬* TerraTec EWX24/96 MIDI

20:0┬*┬*┬* USB Device 0x170b:0x11┬*┬*┬*┬*┬*┬*┬*┬*┬*┬* USB Device 0x170b:0x11 MIDI 1

$ alsa-midi-latency-test -i20:0 -o20:0

> alsa-midi-latency-test 0.0.3

> clock resolution: 0.000000001 s



> sampling 10000 midi latency values - please wait ...

> press Ctrl+C to abort test



sample; latency_ms; latency_ms_worst

┬*┬*┬*┬* 0;┬*┬*┬*┬*┬*┬* 1.80;┬*┬*┬*┬*┬*┬* 1.80┬*┬*┬*┬*

┬*┬*┬*┬* 2;┬*┬*┬*┬*┬*┬* 1.99;┬*┬*┬*┬*┬*┬* 1.99┬*┬*┬*┬*

┬*┬*┬*┬* 4;┬*┬*┬*┬*┬*┬* 1.99;┬*┬*┬*┬*┬*┬* 1.99┬*┬*┬*┬*

┬*┬*┬*┬* 6;┬*┬*┬*┬*┬*┬* 2.01;┬*┬*┬*┬*┬*┬* 2.01┬*┬*┬*┬*

┬*┬*┬* 12;┬*┬*┬*┬*┬*┬* 2.07;┬*┬*┬*┬*┬*┬* 2.07┬*┬*┬*┬*

┬*┬*┬* 62;┬*┬*┬*┬*┬*┬* 7.16;┬*┬*┬*┬*┬*┬* 7.16┬*┬*┬*┬*

┬*┬*┬* 65;┬*┬*┬*┬*┬*┬* 9.33;┬*┬*┬*┬*┬*┬* 9.33┬*┬*┬*┬*

┬* 5668;┬*┬*┬*┬*┬* 10.43;┬*┬*┬*┬*┬* 10.43┬*┬*┬*┬*

┬* 9999;┬*┬*┬*┬*┬*┬* 1.99;┬*┬*┬*┬*┬* 10.43┬*┬*┬*┬*

> done.



> latency distribution:

...

┬* 1.3 -┬* 1.4 ms:┬*┬*┬*┬*┬*┬*┬* 2 #

┬* 1.4 -┬* 1.5 ms:┬*┬*┬*┬*┬*┬*┬* 4 #

┬* 1.5 -┬* 1.6 ms:┬*┬*┬*┬*┬*┬* 11 #

┬* 1.6 -┬* 1.7 ms:┬*┬*┬*┬*┬*┬*┬* 8 #

┬* 1.7 -┬* 1.8 ms:┬*┬*┬*┬*┬*┬* 32 #

┬* 1.8 -┬* 1.9 ms:┬*┬*┬*┬*┬*┬* 84 #

┬* 1.9 -┬* 2.0 ms:┬*┬*┬*┬*┬* 848 #####

┬* 2.0 -┬* 2.1 ms:┬*┬*┬*┬* 8810 ##################################################

┬* 2.1 -┬* 2.2 ms:┬*┬*┬*┬*┬*┬* 67 #

┬* 2.2 -┬* 2.3 ms:┬*┬*┬*┬*┬*┬* 63 #

┬* 2.3 -┬* 2.4 ms:┬*┬*┬*┬*┬*┬* 13 #

┬* 2.4 -┬* 2.5 ms:┬*┬*┬*┬*┬*┬*┬* 7 #

┬* 2.5 -┬* 2.6 ms:┬*┬*┬*┬*┬*┬*┬* 8 #

┬* 2.6 -┬* 2.7 ms:┬*┬*┬*┬*┬*┬*┬* 3 #

...

┬* 2.8 -┬* 2.9 ms:┬*┬*┬*┬*┬*┬*┬* 4 #

┬* 2.9 -┬* 3.0 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

┬* 3.0 -┬* 3.1 ms:┬*┬*┬*┬*┬*┬*┬* 4 #

┬* 3.1 -┬* 3.2 ms:┬*┬*┬*┬*┬*┬* 10 #

┬* 3.2 -┬* 3.3 ms:┬*┬*┬*┬*┬*┬*┬* 5 #

┬* 3.3 -┬* 3.4 ms:┬*┬*┬*┬*┬*┬*┬* 2 #

...

┬* 3.6 -┬* 3.7 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

...

┬* 3.9 -┬* 4.0 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

┬* 4.0 -┬* 4.1 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

┬* 4.1 -┬* 4.2 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

┬* 4.2 -┬* 4.3 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

┬* 4.3 -┬* 4.4 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

...

┬* 4.5 -┬* 4.6 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

...

┬* 5.0 -┬* 5.1 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

┬* 5.1 -┬* 5.2 ms:┬*┬*┬*┬*┬*┬*┬* 2 #

...

┬* 7.2 -┬* 7.3 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

...

┬* 9.1 -┬* 9.2 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

...

┬* 9.3 -┬* 9.4 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

...

10.4 - 10.5 ms:┬*┬*┬*┬*┬*┬*┬* 1 #



> FAIL



best latency was 1.25 ms

worst latency was 10.43 ms, which is too much. Please check:



┬* - if your hardware uses shared IRQs - `watch -n 1 cat /proc/interrupts`

┬*┬*┬* while running this test to see, which IRQs the OS is using for your midi hardware,



┬* - if you're running this test on a realtime OS - `uname -a` should contain '-rt',



┬* - your OS' scheduling priorities - `chrt -p [pidof process name|IRQ-?]`.



Have a look at

┬* http://www.linuxaudio.org/mailarchive/lat/

to find out, howto fix issues with high midi latencies.

$ alsa-midi-latency-test -i20:0 -o20:0

> alsa-midi-latency-test 0.0.3

> clock resolution: 0.000000001 s



> sampling 10000 midi latency values - please wait ...

> press Ctrl+C to abort test



sample; latency_ms; latency_ms_worst

┬*┬*┬*┬* 0;┬*┬*┬*┬*┬*┬* 1.68;┬*┬*┬*┬*┬*┬* 1.68┬*┬*┬*┬*

┬*┬*┬*┬* 1;┬*┬*┬*┬*┬*┬* 1.85;┬*┬*┬*┬*┬*┬* 1.85┬*┬*┬*┬*

┬*┬*┬*┬* 2;┬*┬*┬*┬*┬*┬* 1.97;┬*┬*┬*┬*┬*┬* 1.97┬*┬*┬*┬*

┬*┬*┬*┬* 3;┬*┬*┬*┬*┬*┬* 1.98;┬*┬*┬*┬*┬*┬* 1.98┬*┬*┬*┬*

┬*┬*┬*┬* 5;┬*┬*┬*┬*┬*┬* 1.99;┬*┬*┬*┬*┬*┬* 1.99┬*┬*┬*┬*

┬*┬*┬* 11;┬*┬*┬*┬*┬*┬* 2.00;┬*┬*┬*┬*┬*┬* 2.00┬*┬*┬*┬*

┬*┬*┬* 12;┬*┬*┬*┬*┬*┬* 6.49;┬*┬*┬*┬*┬*┬* 6.49┬*┬*┬*┬*

┬*┬* 652;┬*┬*┬*┬*┬*┬* 7.61;┬*┬*┬*┬*┬*┬* 7.61┬*┬*┬*┬*

┬* 9999;┬*┬*┬*┬*┬*┬* 1.96;┬*┬*┬*┬*┬*┬* 7.61┬*┬*┬*┬*

> done.



> latency distribution:

...

┬* 1.3 -┬* 1.4 ms:┬*┬*┬*┬*┬*┬*┬* 6 #

┬* 1.4 -┬* 1.5 ms:┬*┬*┬*┬*┬*┬*┬* 2 #

┬* 1.5 -┬* 1.6 ms:┬*┬*┬*┬*┬*┬*┬* 9 #

┬* 1.6 -┬* 1.7 ms:┬*┬*┬*┬*┬*┬*┬* 4 #

┬* 1.7 -┬* 1.8 ms:┬*┬*┬*┬*┬*┬* 11 #

┬* 1.8 -┬* 1.9 ms:┬*┬*┬*┬*┬*┬* 72 #

┬* 1.9 -┬* 2.0 ms:┬*┬*┬*┬*┬* 892 #####

┬* 2.0 -┬* 2.1 ms:┬*┬*┬*┬* 8813 ##################################################

┬* 2.1 -┬* 2.2 ms:┬*┬*┬*┬*┬* 113 #

┬* 2.2 -┬* 2.3 ms:┬*┬*┬*┬*┬*┬* 31 #

┬* 2.3 -┬* 2.4 ms:┬*┬*┬*┬*┬*┬*┬* 7 #

┬* 2.4 -┬* 2.5 ms:┬*┬*┬*┬*┬*┬*┬* 3 #

┬* 2.5 -┬* 2.6 ms:┬*┬*┬*┬*┬*┬*┬* 5 #

┬* 2.6 -┬* 2.7 ms:┬*┬*┬*┬*┬*┬*┬* 4 #

┬* 2.7 -┬* 2.8 ms:┬*┬*┬*┬*┬*┬*┬* 4 #

┬* 2.8 -┬* 2.9 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

┬* 2.9 -┬* 3.0 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

┬* 3.0 -┬* 3.1 ms:┬*┬*┬*┬*┬*┬*┬* 2 #

┬* 3.1 -┬* 3.2 ms:┬*┬*┬*┬*┬*┬*┬* 4 #

┬* 3.2 -┬* 3.3 ms:┬*┬*┬*┬*┬*┬*┬* 2 #

...

┬* 3.4 -┬* 3.5 ms:┬*┬*┬*┬*┬*┬*┬* 3 #

...

┬* 3.6 -┬* 3.7 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

...

┬* 3.8 -┬* 3.9 ms:┬*┬*┬*┬*┬*┬*┬* 2 #

...

┬* 4.3 -┬* 4.4 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

...

┬* 5.0 -┬* 5.1 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

┬* 5.1 -┬* 5.2 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

...

┬* 5.6 -┬* 5.7 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

...

┬* 6.0 -┬* 6.1 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

...

┬* 6.2 -┬* 6.3 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

...

┬* 6.5 -┬* 6.6 ms:┬*┬*┬*┬*┬*┬*┬* 1 #

...

┬* 7.6 -┬* 7.7 ms:┬*┬*┬*┬*┬*┬*┬* 1 #



> FAIL



best latency was 1.28 ms

worst latency was 7.61 ms, which is too much. Please check:



┬* - if your hardware uses shared IRQs - `watch -n 1 cat /proc/interrupts`

┬*┬*┬* while running this test to see, which IRQs the OS is using for your midi hardware,



┬* - if you're running this test on a realtime OS - `uname -a` should contain '-rt',



┬* - your OS' scheduling priorities - `chrt -p [pidof process name|IRQ-?]`.



Have a look at

┬* http://www.linuxaudio.org/mailarchive/lat/

to find out, howto fix issues with high midi latencies.

$ uname -a

Linux 64studio 2.6.31-2-multimedia-amd64 #1 SMP PREEMPT RT Thu Oct 1 16:14:20 BST 2009 x86_64 GNU/Linux

$ watch -n 1 cat /proc/interrupts

Every 1.0s: cat /proc/interrupts┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬* ┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬* ┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬* ┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬*┬* Mon Jun 21 16:19:33 2010



┬*┬*┬*┬*┬*┬*┬*┬*┬*┬* CPU0┬*┬*┬*┬*┬*┬* CPU1

┬* 0:┬*┬*┬*┬*┬*┬*┬* 123┬*┬*┬*┬*┬*┬*┬*┬* 11┬*┬* IO-APIC-edge┬*┬*┬*┬*┬* timer

┬* 1:┬*┬*┬*┬*┬*┬*┬*┬*┬* 8┬*┬*┬*┬*┬*┬* 3191┬*┬* IO-APIC-edge┬*┬*┬*┬*┬* i8042

┬* 4:┬*┬*┬*┬*┬*┬*┬*┬*┬* 0┬*┬*┬*┬*┬*┬*┬*┬*┬* 2┬*┬* IO-APIC-edge

┬* 7:┬*┬*┬*┬*┬*┬*┬*┬*┬* 0┬*┬*┬*┬*┬*┬*┬*┬*┬* 0┬*┬* IO-APIC-edge┬*┬*┬*┬*┬* parport0

┬* 8:┬*┬*┬*┬*┬*┬*┬*┬*┬* 0┬*┬*┬*┬*┬*┬*┬*┬*┬* 1┬*┬* IO-APIC-edge┬*┬*┬*┬*┬* rtc0

┬* 9:┬*┬*┬*┬*┬*┬*┬*┬*┬* 0┬*┬*┬*┬*┬*┬*┬*┬*┬* 0┬*┬* IO-APIC-fasteoi┬*┬* acpi

12:┬*┬*┬*┬*┬*┬* 1024┬*┬*┬*┬* 405706┬*┬* IO-APIC-edge┬*┬*┬*┬*┬* i8042

14:┬*┬*┬*┬*┬*┬*┬*┬* 68┬*┬*┬*┬*┬* 26273┬*┬* IO-APIC-edge┬*┬*┬*┬*┬* ide0

16:┬*┬*┬*┬*┬*┬*┬*┬*┬* 0┬*┬*┬*┬*┬*┬*┬*┬*┬* 1┬*┬* IO-APIC-fasteoi┬*┬* ohci_hcd:usb1

17:┬*┬*┬*┬*┬*┬*┬* 131┬*┬*┬*┬*┬* 39969┬*┬* IO-APIC-fasteoi┬*┬* ohci_hcd:usb3, ohci_hcd:usb5

18:┬*┬*┬*┬*┬*┬*┬* 398┬*┬*┬*┬* 298098┬*┬* IO-APIC-fasteoi┬*┬* ohci_hcd:usb4, ohci_hcd:usb6, nvidia

19:┬*┬*┬*┬*┬*┬*┬*┬*┬* 0┬*┬*┬*┬*┬*┬*┬*┬*┬* 2┬*┬* IO-APIC-fasteoi┬*┬* ehci_hcd:usb2

21:┬*┬*┬*┬*┬*┬*┬*┬*┬* 0┬*┬*┬*┬*┬*┬*┬*┬*┬* 0┬*┬* IO-APIC-fasteoi┬*┬* ICE1712

22:┬*┬*┬*┬*┬*┬*┬*┬* 97┬*┬*┬*┬*┬* 35525┬*┬* IO-APIC-fasteoi┬*┬* ohci1394, ahci

26:┬*┬*┬*┬*┬*┬*┬*┬* 36┬*┬*┬*┬*┬* 13608┬*┬* PCI-MSI-edge┬*┬*┬*┬*┬* eth0

NMI:┬*┬*┬*┬*┬*┬*┬*┬*┬* 0┬*┬*┬*┬*┬*┬*┬*┬*┬* 0┬*┬* Non-maskable interrupts

LOC:┬*┬*┬*┬* 647594┬*┬*┬*┬* 532821┬*┬* Local timer interrupts

SPU:┬*┬*┬*┬*┬*┬*┬*┬*┬* 0┬*┬*┬*┬*┬*┬*┬*┬*┬* 0┬*┬* Spurious interrupts

CNT:┬*┬*┬*┬*┬*┬*┬*┬*┬* 0┬*┬*┬*┬*┬*┬*┬*┬*┬* 0┬*┬* Performance counter interrupts

PND:┬*┬*┬*┬*┬*┬*┬*┬*┬* 0┬*┬*┬*┬*┬*┬*┬*┬*┬* 0┬*┬* Performance pending work

RES:┬*┬*┬*┬* 678727┬*┬*┬*┬*┬* 69574┬*┬* Rescheduling interrupts

CAL:┬*┬*┬*┬*┬*┬* 1102┬*┬*┬*┬*┬*┬*┬*┬* 62┬*┬* Function call interrupts

TLB:┬*┬*┬*┬*┬*┬* 1383┬*┬*┬*┬*┬*┬* 1591┬*┬* TLB shootdowns

TRM:┬*┬*┬*┬*┬*┬*┬*┬*┬* 0┬*┬*┬*┬*┬*┬*┬*┬*┬* 0┬*┬* Thermal event interrupts

THR:┬*┬*┬*┬*┬*┬*┬*┬*┬* 0┬*┬*┬*┬*┬*┬*┬*┬*┬* 0┬*┬* Threshold APIC interrupts

MCE:┬*┬*┬*┬*┬*┬*┬*┬*┬* 0┬*┬*┬*┬*┬*┬*┬*┬*┬* 0┬*┬* Machine check exceptions

MCP:┬*┬*┬*┬*┬*┬*┬*┬* 11┬*┬*┬*┬*┬*┬*┬*┬* 11┬*┬* Machine check polls

ERR:┬*┬*┬*┬*┬*┬*┬*┬*┬* 0

MIS:┬*┬*┬*┬*┬*┬*┬*┬*┬* 0

$ lsusb

Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 003 Device 002: ID 170b:0011 Swissonic MIDI-USB 1x1

Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users

Daniel James 06-21-2010 02:42 PM

ALSA MIDI latency test - was: opensource.com talk
 
Hi Ralf,

>> FAIL
>
> best latency was 1.29 ms
> worst latency was 7.00 ms, which is too much.

Thanks for running those tests, that's very helpful.

I'd be interested to know if other users can 'pass' this test using our
current distros and kernels. If not, it seems like we have some more
tweaking to do :-)

Cheers!

Daniel James
Director
64 Studio Ltd.
_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users

Ralf Mardorf 06-21-2010 03:17 PM

ALSA MIDI latency test - was: opensource.com talk
 
Daniel James wrote:
> Thanks for running those tests, that's very helpful.
>
> I'd be interested to know if other users can 'pass' this test using our
> current distros and kernels. If not, it seems like we have some more
> tweaking to do :-)
>
> Cheers!
>
> Daniel James
> Director
> 64 Studio Ltd.
>

Hi all, hi Daniel,

everybody should run this test, with what MIDI interface ever, even
people who don't use MIDI. Just connect the hardware MIDI output to the
hardware MIDI input by a cable or adapter and run ...

$ alsa-midi-latency-test -l
Port Client name Port name
14:0 Midi Through Midi Through Port-0
16:0 TerraTec EWX24/96 TerraTec EWX24/96 MIDI
20:0 USB Device 0x170b:0x11 USB Device 0x170b:0x11 MIDI 1
$ alsa-midi-latency-test -i20:0 -o20:0

... where -i20:0 -o20:0 only is for my USB MIDI ;).

If anybody wish to get the amd64 packages for 3.0 beta, resp. Ubuntu
Hardy and 3.3 alpha, resp. Karmic I could send them:

alsa-midi-latency_0.0.3-1git20100621_amd64.deb
alsa-midi-latency_0.0.3-1git20100621~3.3a_amd64.deb

Unfortunately I didn't add dependencies, but this shouldn't be a problem.

For 3.3 alpha I added ...

$ watch -n 1 cat /proc/interrupts
16: 0 1 IO-APIC-fasteoi ohci_hcd:usb1
17: 131 39969 IO-APIC-fasteoi ohci_hcd:usb3, ohci_hcd:usb5
18: 398 298098 IO-APIC-fasteoi ohci_hcd:usb4,
ohci_hcd:usb6, nvidia
19: 0 2 IO-APIC-fasteoi ehci_hcd:usb2
21: 0 0 IO-APIC-fasteoi ICE1712
$ lsusb
Bus 003 Device 002: ID 170b:0011 Swissonic MIDI-USB 1x1

... so the graphics is not sharing the interrupt with the USB MIDI.

I'll run it now for 3.0 beta, I missed to do it for the last mail.

$ watch -n 1 cat /proc/interrupts
Every 1.0s: cat
/proc/interrupts
Mon Jun 21 16:58:30 2010

CPU0 CPU1
0: 124 5 IO-APIC-edge timer
1: 0 987 IO-APIC-edge i8042
4: 0 2 IO-APIC-edge
8: 0 1 IO-APIC-edge rtc0
9: 0 0 IO-APIC-fasteoi acpi
12: 50 200835 IO-APIC-edge i8042
14: 15 14655 IO-APIC-edge ide0
16: 0 1 IO-APIC-fasteoi ohci_hcd:usb1
17: 1 88 IO-APIC-fasteoi ohci_hcd:usb3, ohci_hcd:usb5
18: 0 2 IO-APIC-fasteoi ohci_hcd:usb4, ohci_hcd:usb6
19: 0 2 IO-APIC-fasteoi ehci_hcd:usb2
21: 0 0 IO-APIC-fasteoi ICE1712
22: 23 40057 IO-APIC-fasteoi firewire_ohci, ahci
26: 3 2116 PCI-MSI-edge eth0
NMI: 0 0 Non-maskable interrupts
LOC: 243943 253606 Local timer interrupts
SPU: 0 0 Spurious interrupts
CNT: 0 0 Performance counter interrupts
PND: 0 0 Performance pending work
RES: 216066 50027 Rescheduling interrupts
CAL: 75 43 Function call interrupts
TLB: 1067 1190 TLB shootdowns
TRM: 0 0 Thermal event interrupts
THR: 0 0 Threshold APIC interrupts
MCE: 0 0 Machine check exceptions
MCP: 5 5 Machine check polls
ERR: 0
MIS: 0
$ lsusb
Bus 004 Device 001: ID 1d6b:0001
Bus 005 Device 001: ID 1d6b:0001
Bus 006 Device 001: ID 1d6b:0001
Bus 003 Device 002: ID 170b:0011
Bus 003 Device 001: ID 1d6b:0001
Bus 001 Device 001: ID 1d6b:0001
Bus 002 Device 001: ID 1d6b:0002

No NVIDI, okay, it's the FLOSS driver for 3.0 beta and the proprietary
for 3.3 alpha, anyway, there should be an interrupt ;) and no USB MIDI
for 3.0 beta, but it's available ;) and I didn't change the port.

Cheers!

Ralf

_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users

Ralf Mardorf 06-21-2010 03:59 PM

ALSA MIDI latency test - was: opensource.com talk
 
I did not run glxgears, but I did run the test for each release 2 times
by 'soft' and 'hard' stressing the system, e.g. moving a window or
opening a webpage or closing Firefox etc..
_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users

Gustin Johnson 06-21-2010 05:22 PM

ALSA MIDI latency test - was: opensource.com talk
 
On 10-06-21 08:42 AM, Daniel James wrote:
> Hi Ralf,
>
>>> FAIL
>>
>> best latency was 1.29 ms
>> worst latency was 7.00 ms, which is too much.
>
> Thanks for running those tests, that's very helpful.
>
> I'd be interested to know if other users can 'pass' this test using our
> current distros and kernels. If not, it seems like we have some more
> tweaking to do :-)
>
Those values are what you can expect with USB MIDI. If you have no
choice but to use USB gear then try to minimize the number of USB
devices that are in use. For example use PS/2 based HIDs (aka keyboard
and mouse). Disconnect any other USB devices (such as printers and
scanners).

Even doing that I do not think that there is much room for improvement.

In the next couple of days I will try and test my own rig with the RME
and USB MIDI interfaces.

_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users

Ralf Mardorf 06-23-2010 10:02 PM

ALSA MIDI latency test - was: opensource.com talk
 
On Wed, 2010-06-23 at 15:40 -0600, Gustin Johnson wrote:


On 10-06-22 09:42 AM, Ralf Mardorf wrote:
> Gustin Johnson wrote:
>> On 10-06-21 08:42 AM, Daniel James wrote:
>>
>>> Hi Ralf,
>>>
>>>
>>>>> FAIL
>>>>>
>>>> best latency was 1.29 ms
>>>> worst latency was 7.00 ms, which is too much.
>>>>
>>> Thanks for running those tests, that's very helpful.
>>>
>>> I'd be interested to know if other users can 'pass' this test using our
>>> current distros and kernels. If not, it seems like we have some more
>>> tweaking to do :-)
>>>
>>>
>> Those values are what you can expect with USB MIDI. If you have no
>> choice but to use USB gear then try to minimize the number of USB
>> devices that are in use. For example use PS/2 based HIDs (aka keyboard
>> and mouse). Disconnect any other USB devices (such as printers and
>> scanners).
>>
>> Even doing that I do not think that there is much room for improvement.
>>
>> In the next couple of days I will try and test my own rig with the RME
>> and USB MIDI interfaces.
>
> It's the only USB device in use. Mouse and keyboard are PS/2 devices, my
> printer isn't in use, but still a parallel port one and the USB stick is
> just for temporarily backups and usually not connected.
>
> I did start a reply regarding to rtirq defaults for USB and I started an
> experiment, but then my PATA hard disk failed and there is an issue with
> GRUB for my SATA.
>
The limitations are with how USB actually works. It was not designed
for low latency responsiveness. Messing with IRQs is going to be
enough. You might see some improvement, but not enough to make a
difference.




Yep :(.








> I wasted my whole day with trying to repair GRUB for the SATA, but it
> didn't work.
> Then I tried to run a live cd, to get access to the internet, but there
> is no new live cd with PPPoE and a lot of old live cds didn't run on my
> computer or didn't support PPPoE too.
>
If GRUB was installed on the PATA, you will need to install it into your
SATA drive. The difficulty will scale with the number of hard drives
and OSs that you have installed. I know that your system can be
rescued. Most rescue distros have the option to boot an OS off of your
hard drive. The one I use and love is systemrescuecd, though it is very
much CLI orientated.




101% ACK regarding to the systemrescuecd, it's my favourite too :), but it failed. I guess there's something esoterically for Suse, because I could solve it using the Suse install DVD. While everything was ok for 64 Studio 2.1, after using an Ubuntu live cd, the same way I would have used a systemrescuecd (with one difference, for the Ubuntu CD I had PPPoE, but not for the systemrescuecd).





> Now I run the Ubuntu 7.10 live cd from a German magazine from 2008, it
> ships with pppoeconf.
>
> Fazit: At the moment I don't have access to the ALSA MIDI latency
> packages and I can't run 64 Studio 3.0 beta and 3.3 alpha, both are on
> the broken PATA.
>
> Tomorrow, perhaps tonight, I'll try to get access to my SATA, resp. to
> Suse 11.2. I don't have the time to do it now.
>
> Hopefully my PATA will start just one time again, to get it completely
> up-to-date backuped, at the moment it's disconnected to nurse it.
>
What exactly is wrong with it? If you cannot mount it from a live CD,
then the drive is probably toast.




The drive is absolutely 'toast' (I guess I translated 'toast' correctly ;). 'Click-click' ;) ...




Gene Heskett about how to handle a hard disk drive:


One could also use a hammer
with plastic faces in case the hand bruises easily. ;-)




Quoted out of context ... I'm laughing out loud. But you're right, I've got nothing to lose. Thank you.




The HD is 4 years old and I do a startup several times a day. Not good for the HDs, but the power bill vs the costs of a HD ;). I wasn't surprised when it was broken and for any HD >= 2years I do backups very often ;). Anyway, Gene's idea is very cool.



It will take around 7 days and I'm back to 64 Studio 3.0 and 3.3 ;) ... with a loss of 3 days regarding to the systems backups, but just 1 day regarding to a thunderbird backup.



And again, full ACK regarding to the systemrescuecd, it fix everything regarding to DEB Linuxes, but not to Suse, while Suse 64-bit has got advantages regarding to 32-bit apps. I guess for the future I'll prefer DEB @ 32-bit :D, resp. 64 Studio 4.0 i369 ;).



Cheers!



Ralf


_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users


All times are GMT. The time now is 07:52 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.