joshinils 7 Posted May 24, 2023 Share Posted May 24, 2023 I set a niceness of -5 for the emby processes via htop, but that doesnt persist through restarts (sudo service emby-server start). Creating a copy of "/usr/lib/systemd/system/emby-server.service" to "/etc/systemd/system/emby-server.service" and editing it to be: [Unit] Description=Emby Server is a personal media server with apps on just about every device After=network.target [Service] EnvironmentFile=/etc/emby-server.conf WorkingDirectory=/opt/emby-server ExecStart=/usr/bin/nice -n -5 /opt/emby-server/bin/emby-server RestartForceExitStatus=3 User=emby [Install] WantedBy=multi-user.target Doesn't work. Plainly calling "sudo nice -n -5 /opt/emby-server/bin/emby-server" does start emby with niceness of -5, but of course that doesn't start it as a service. I know that I know too little about systemd to understand this as is, which is why I ask here. Link to comment Share on other sites More sharing options...
Luke 37272 Posted May 24, 2023 Share Posted May 24, 2023 Hmm. @Q-Droidhave you tried this before? Link to comment Share on other sites More sharing options...
Solution Q-Droid 670 Posted May 24, 2023 Solution Share Posted May 24, 2023 Clean way to do this is with a service unit override. 1. Stop emby and restore the original unit file. 2. Verify that the unit file has the original ExecStart command: $ systemctl show emby-server |grep ExecStart 3. Create a unit override to add the Nice parameter. This will open an editor where you can add Nice=-5 to the service block. $ systemctl edit emby-server Add: [Service] Nice=-5 4. Exit and save the override file. Y and enter for the prompts. 5. Start the Emby server. And run top/htop to verify the new nice value. 4 2 Link to comment Share on other sites More sharing options...
joshinils 7 Posted May 24, 2023 Author Share Posted May 24, 2023 Thank you! That worked perfectly. Now I can watch stuff without interruptions while the same machine is busy with handbrake. 1 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now