New answers tagged

0

You are missing how nice works. It is simply a hint to the scheduler for it to prioritize some processes against others when there is a CPU bottleneck. I there is nothing else running, whatever its niceness, your process will be granted all the CPU power so there is no need to change the niceness in that specific case.


2

@zuazo's answer is very informative for pulseaudio specifically. For completeness, I'll note that in the general case, there are four circumstances that can cause a process not owned by root to have a high priority: The program being run is setuid-root, and gave itself the high priority and then changed its uid. The process has the SELinux capability ...


2

PulseAudio requires higher priority than other desktop programs mainly to avoid latency problems and get a skip-free audio playback. But the process that allows PulseAudio to have a higher priority is rather complex. To get this special priority, it uses the RealtimeKit (rtkit-daemon) process. This D-Bus service allows some user programs to use real-time ...


0

I just needed something similar. The answer from mkomitee helped me. But the command ps -e lists only processes. The load should take into account that a process may have many threads running in parallel. I suggest to add the option -L to the call of ps to list all threads: ps -eLo state,nice | awk 'BEGIN {c=0} $2<=0 && $1 ~ /R/ { c++ } END ...



Top 50 recent answers are included