PREEMPT debian kernel rt issues

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
User avatar
wakoo
Established Member
Posts: 18
Joined: Tue Dec 25, 2018 11:31 pm

PREEMPT debian kernel rt issues

Post by wakoo »

On fresh Debian 9 I've installed a real-time kernel (official from the repos: linux-image-4.9.0-8-rt-amd64). Well, in accordance with this info, the real time kernel may have this specs:

Code: Select all

CONFIG_HZ_1000=y
CONFIG_HZ=1000
CONFIG_PREEMPT_RT_FULL=y
CONFIG_PREEMPT=y
But on linux-image-4.9.0-8-rt-amd64, the parameters are:

Code: Select all

#CONFIG_HZ_1000=y
CONFIG_HZ=250
My question is, How to edit those specs on kernel and how to make those changes persistent.

Salut!
Last edited by wakoo on Thu Dec 27, 2018 6:10 am, edited 1 time in total.
User avatar
khz
Established Member
Posts: 1648
Joined: Thu Apr 17, 2008 6:29 am
Location: German
Has thanked: 42 times
Been thanked: 92 times

Re: PREEMPT debian kernel rt issues

Post by khz »

Code: Select all

cd /usr/src/linux

Code: Select all

make menuconfig
Processor type and features -> Preemption Model -> (höchste RT-Einstellung vornehmen)
Processor type and features -> Timer Frequency auf 1000
==> Realtime Kernel: https://wiki.debianforum.de/Realtime_Ke ... figurieren >> 5 Kompilieren >> 6 Installieren (https://www.deepl.com/translate)

The Debian Administrator's Handbook: 8.10. Compiling a Kernel https://debian-handbook.info/browse/sta ... ation.html (https://debian-handbook.info/browse/de- ... ation.html)

Debian GNU/Linux Installation Guide: 8.6. Compiling a New Kernel https://www.debian.org/releases/stable/ ... 06.html.en (https://www.debian.org/releases/stable/ ... 06.html.de)
. . . FZ - Does humor belongs in Music?
. . GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
  • I don't care about the freedom of speech because I have nothing to say.
Jack Winter
Established Member
Posts: 381
Joined: Sun May 28, 2017 3:52 pm

Re: PREEMPT debian kernel rt issues

Post by Jack Winter »

wakoo wrote:My question is, How to edit those specs on kernel and how to make those changes persistent.
You probably shouldn't. The kernel is most likely configured as a so called tickless kernel which most likely is better for our purposes than using the 1000Hz ticker (grep the config file for NO_HZ). Also check that it has CONFIG_HIGH_RES_TIMERS and CONFIG_SND_HRTIMER=m / CONFIG_SND_SEQ_HRTIMER_DEFAULT=y

The info on https://wiki.linuxaudio.org/wiki/system ... the_kernel referring to kernel configuration is IMO no longer relevant.

If you really want to, you'll have to learn how to build and install your own kernel..
Reaper/KDE/Archlinux. i7-2600k/16GB + i7-4700HQ/16GB, RME Multiface/Babyface, Behringer X32, WA273-EQ, 2 x WA-412, ADL-600, Tegeler TRC, etc 8) For REAPER on Linux information: https://wiki.cockos.com/wiki/index.php/REAPER_for_Linux
User avatar
wakoo
Established Member
Posts: 18
Joined: Tue Dec 25, 2018 11:31 pm

Re: PREEMPT debian kernel rt issues

Post by wakoo »

Thanks for the answers. Now I've learned a little about the kernel. I forget the next lines from the wiki of linuxaudio.org:
Since Debian Wheezy an RT variant is also available in the stock repositories; unfortunately its system timer is set to 250 Hz instead of 1000 Hz, so you'll probably want to recompile your own kernel anyway, especially if you use ALSA MIDI.
So, I have two options: 1) Compile my own kernel, or 2) Download a kernel rt (like AVLinux).

I appreciate your help.

Regards and Happy Music-hacking!
User avatar
khz
Established Member
Posts: 1648
Joined: Thu Apr 17, 2008 6:29 am
Location: German
Has thanked: 42 times
Been thanked: 92 times

Re: PREEMPT debian kernel rt issues

Post by khz »

Welcome btw
Liquorix Kernel and/or "make menuconfig"
;-)
<EDIT>

Code: Select all

cat /proc/interrupts | grep -i time; sleep 10; cat /proc/interrupts | grep time
My results:

Code: Select all

  0:   74763084          0          0          0          0          0   IO-APIC   2-edge      timer
LOC:   12117727   21586639   18222512   17371363   17532116   17976564   Local timer interrupts
  0:   74803799          0          0          0          0          0   IO-APIC   2-edge      timer
LOC:   12124588   21597292   18231815   17380505   17539466   17985614   Local timer interrupts

Code: Select all

zcat /proc/config.gz |grep CONFIG_HZ_
My results:

Code: Select all

# CONFIG_HZ_PERIODIC is not set
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not set
CONFIG_HZ_1000=y
==> https://stackoverflow.com/questions/124 ... 7#43212587

Code: Select all

zcat /proc/config.gz |grep CONFIG_PREEMPT
My results:

Code: Select all

CONFIG_PREEMPT_RCU=y
CONFIG_PREEMPT_NOTIFIERS=y
CONFIG_PREEMPT=y
CONFIG_PREEMPT_RT_BASE=y
CONFIG_PREEMPT_LAZY=y
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT__LL is not set
# CONFIG_PREEMPT_RTB is not set
CONFIG_PREEMPT_RT_FULL=y
CONFIG_PREEMPT_COUNT=y
# CONFIG_PREEMPTIRQ_EVENTS is not set
# CONFIG_PREEMPT_TRACER is not set
</EDIT>
. . . FZ - Does humor belongs in Music?
. . GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
  • I don't care about the freedom of speech because I have nothing to say.
User avatar
sysrqer
Established Member
Posts: 2523
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 320 times
Been thanked: 151 times
Contact:

Re: PREEMPT debian kernel rt issues

Post by sysrqer »

Do you actually have a problem with the way it is at the moment? I've compiled many kernels and played with this option but I've never seen any difference with it and, as far as I understand, there is not a consensus about which is best. Unless you have a reason to, or you want to learn to build your own kernels, then don't worry about it.
Post Reply