Kernel scheduler frequency

No replies
Erdie
Erdie's picture
User offline. Last seen 16 hours 15 min ago. Offline
Joined: 2006-03-27
Posts:

Hi all,

since a certain kernel version there is a possibility to switch my kernel scheduler between 100, 250 and 100 Hz. The default is 250 Hz. Does it make sence to change these values to a higher value even you are using jack in the realtime mode? Does it have any effect anyway?

thanks
Erdie

Son of Zev
User offline. Last seen 8 years 6 days ago. Offline
Joined: 2006-03-27
Posts:

I've been using the "nitro" patch set for some time (basically ck patches plus a few other additions).

The documentation suggests for "workstation/desktop" operations the timer should be set to 1000MHz. 1000 MHz is working very well for me since i started using the nitro kernel. My system runs rock solid with jackd period set to 128 which translates to 2.9 ms at 44.1Khz and 2.7ms at 96Khz (or so ardour reports).

There was a noticeable difference compared to the gentoo-kernel patchset I was using at the time, but as I haven't compiled a kernel with a slower timer resolution I can't confirm categorically this is the best setting but it is the recommended setting and seems to work well.

Son of Zev
If? Records/Littlewolf Records
64-bit ardour
Athlon64 3500+ 1Gb low latency Ram
M-Audio Delta 1010 - MOTU mtpav(as standalone 64bit driver not working)

Solv
User offline. Last seen 4 years 41 weeks ago. Offline
Joined: 2006-03-27
Posts:

wow...this is great news...i've compiled my own 64 bit system on Gentoo, I have a very similar pc to you...and still getting some xruns and user exceeds errors as well....so I'll recompile the 2.6.15 gentoo kernel at 1000MHz rather than the 250 and see what happebs!

Cheers,
Solv

Erdie
Erdie's picture
User offline. Last seen 16 hours 15 min ago. Offline
Joined: 2006-03-27
Posts:

I switched to 1 kHz and could not detect any significant improvement. With 250 Hz i could work around 3 ms without taking care about anything and also use 0.7 ms while shutting down applications like syslog and so on. With 1 kHz scheduler frequency it is quite similar. So i assume that this does not have any effect on realtime processes.

Erdie

victoryone
User offline. Last seen 7 years 46 weeks ago. Offline
Joined: 2006-03-27
Posts:

is it possible to patch your kernel with the realtime patch along with nitro? i've tried briefly, but with not much luck.

or is there not really any point in attempting this?

Son of Zev
User offline. Last seen 8 years 6 days ago. Offline
Joined: 2006-03-27
Posts:

Nitro kernel has all the standard realtime patches. However it still requires the realtime-lsm (security model) to enable standard users to run apps with rt priority

root@computer#emerge realtime-lsm

Son of Zev
If? Records/Littlewolf Records
64-bit ardour
Athlon64 3500+ 1Gb low latency Ram
M-Audio Delta 1010 - MOTU mtpav(as standalone 64bit driver not working)

Son of Zev
User offline. Last seen 8 years 6 days ago. Offline
Joined: 2006-03-27
Posts:

Interesting to know...

It is "supposed" to improve latency performance on general computers... I gather the focus of ck/nitro patches is probably general workstation speed and gaming which would focus more on video.

Son of Zev
If? Records/Littlewolf Records
64-bit ardour
Athlon64 3500+ 1Gb low latency Ram
M-Audio Delta 1010 - MOTU mtpav(as standalone 64bit driver not working)

paul
paul's picture
User offline. Last seen 1 day 15 hours ago. Offline
Joined: 2006-03-16
Posts:

the timer frequency has no impact on RT threads that are scheduled to run as a result of interrupts (e.g. from an audio interface). the threads will start running (again) on return from the interrupt handler (assuming no higher priority RT thread is running; if so, they will start once that thread blocks).

kernel timer frequency improves the "latency" for non-RT threads and makes the system feel somewhat more responsive.

two very different things.

Son of Zev
User offline. Last seen 8 years 6 days ago. Offline
Joined: 2006-03-27
Posts:

Son of Zev
If? Records/Littlewolf Records
64-bit ardour
Athlon64 3500+ 1Gb low latency Ram
M-Audio Delta 1010 - MOTU mtpav(as standalone 64bit driver not working)

Erdie
Erdie's picture
User offline. Last seen 16 hours 15 min ago. Offline
Joined: 2006-03-27
Posts:

OK, there is no influence to the jack realtime performance. But what is the recommendation? Is it recommended to use 1000 Hz while dealing with Ardour and Jack on a Linux computer anyway?

Thanks
Erdie

tim_flatus
User offline. Last seen 8 years 5 days ago. Offline
Joined: 2006-04-20
Posts:

1000Hz is generally recommended, although the only place I have noticed it making a noticeable difference is in MIDI timing.