From 8624d8c14434a87ce1361c7aa00cfc20b496ddbd Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 17 Feb 2018 01:07:06 +0100 Subject: [PATCH] doc/user.xml: example "ps" command for real-time scheduling check --- doc/user.xml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/doc/user.xml b/doc/user.xml index ac11af953..41b0299a8 100644 --- a/doc/user.xml +++ b/doc/user.xml @@ -1399,6 +1399,34 @@ database { zgrep ^CONFIG_RT_GROUP_SCHED /proc/config.gz + + You can verify whether the real-time scheduler is active with + the ps command: + + + # ps H -q `pidof -s mpd` -o 'pid,tid,cls,rtprio,comm' + PID TID CLS RTPRIO COMMAND +16257 16257 TS - mpd +16257 16258 TS - io +16257 16259 FF 50 rtio +16257 16260 TS - player +16257 16261 TS - decoder +16257 16262 FF 50 output:ALSA +16257 16263 IDL 0 update + + + The CLS column shows the CPU scheduler; + TS is the normal scheduler; + FF and RR are + real-time schedulers. In this example, two threads use the + real-time scheduler: the output thread and + the rtio (real-time I/O) thread; these two + are the important ones. The database update thread uses the + idle scheduler ("IDL in + ps), which only gets CPU when no other + process needs it. + + There is a rumor that real-time scheduling improves audio