Screen froze due to a systemd service with nice=19

I met a problem with systemd.

I was running a kernel in real-time for some audio processing.

Suddenly the screen froze and after a while, everything went back on tracks.

I thought it was a nvidia driver problem (some message showed up in journalctl).

But it looks like the froze was triggered by some systemd service running with a nice value of 19 (the nice value for my audio group was also 19).

So, I greped in the systemd services and found:

Nice=19
./system/dnf-makecache.service
Nice=19
./system/dnf5-makecache.service
Nice=19
./system/logrotate.service
Nice=19
./system/man-db-cache-update.service
Nice=19
./system/plocate-updatedb.service

Is it a good idea to run such services with a nice value of 19 ?

If it’s a very low priority task, like updating the locatedb as an example, where you don’t care how long it takes, then running at a nice level of 19 is an excellent idea.

I don’t want my work slowed down just because the system hits a timer and crawls all of my disks updating a database which I rarely use.

If you were doing audio processing and really wanted first bite of the system CPU, running at the lowest priority would seem to be the opposite of what you want to do. You really want negative numbers on time critical tasks like your audio process.

Thanks for the answer. I totally see your point.

My audio usage is quite specific: in need to run guitarix in real time to process the sound of a guitar with a really low latency (below 10 ms).

A priori the service did not disrupt the behavior of guitarix, only the window manager froze for a little time.

You could always renice guitarix after starting it to have a strong negative nice value - -15 or so;

Check for errors in system journal for the GPU and in user journal for the window manager.

I found an error related to the nvidia card stalled for a moment and then everything went fine.

For now, I have still not have met the problem again.

I will post the error message from journalctl once I am able to face the problem again :slight_smile: