LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Start process at boot with some niceness. (https://www.linuxquestions.org/questions/linux-newbie-8/start-process-at-boot-with-some-niceness-4175526975/)

s.verma 12-01-2014 10:05 AM

Start process at boot with some niceness.
 
Dear all,
I want to boot my Debian Sid system such that after boot, my Xorg and plasma-desktop starts with -20 niceness and realtime ioniceness so that GUI becomes responsive for heavy load.

How can I do that.

Can anyone suggest where the Xorg and plasma-desktop startup file located so that I can change /usr/bin/X, /usr/bin/plasma-desktop written in those files to
nice -n -20 /usr/bin/...

Thanks.

JeremyBoden 12-01-2014 05:34 PM

If the GUI becomes more responsive under heavy load, any processes it executes will become even less responsive.

suicidaleggroll 12-01-2014 09:37 PM

You could always just use renice after-the-fact.

s.verma 12-02-2014 12:04 AM

Quote:

Originally Posted by suicidaleggroll (Post 5277933)
You could always just use renice after-the-fact.

I actually want that automatically the Xorg and plasma-desktop starts with desired priority, so that I do not have to manually renice every time after boot.

suicidaleggroll 12-02-2014 09:07 AM

Who said anything about doing it manually? Just stick it in one of the startup scripts and you're done.

jpollard 12-03-2014 10:21 AM

It depends on your distribution.

Changing the nice value can/will muck up your system fairly easily.

If your distribution uses systemd for startup, it also will only screw up the user. The problem is making the X server run with a lower priority than those applications using it. This can cause a priority inversion lockup. USUALLY this can be broken as any process hogging the server will eventually wait on the server... But even then, the X server will respond to it (and the other processes), but once it grabs the cpu again, the X server can get locked out - especially if that process is compute bound.

Under systemd nice values only affect the processes within a cgroup. They don't alter priorities between cgroups.


All times are GMT -5. The time now is 08:19 PM.