Limit CPU usage?

All your suggestions, requests and ideas for future development
Post Reply
hellmaker
Donor
Posts: 36
Joined: 13 Jan 2016, 20:43

Limit CPU usage?

Post by hellmaker »

Hi,

when running Filebot it is using a high amount of CPU on my NAS.
Because it´s a NAS there is not a fast CPU inside.
This wouldn´t be that bad if there isn´t my TV server also running on that NAS.

So when filebot is running at ~90-100% cpu usage AND my tv server is recording i get discontinues in my recordings. This makes the audio stuttering and the video become fragmented.
To avoid problems i´m running filebot at 04:00h AM where normaly no recordings are running.
The problem doing so is that my recordings from the whole day are firstly avaible on the next day.
I plan to run filebot after every finished recording but this is actual not possible because of the high CPU load.

So is there any way to limit that CPU usage to a specific value on my NAS?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Limit CPU usage?

Post by rednoah »

Sure, Linux is very good process management. You just need to figure out how to give your TV server process a very high priority. :D

e.g.
https://www.nixtutor.com/linux/changing ... processes/
:idea: Please read the FAQ and How to Request Help.
hellmaker
Donor
Posts: 36
Joined: 13 Jan 2016, 20:43

Re: Limit CPU usage?

Post by hellmaker »

It seems that "niceness" is not supported / included inside synology.

Coreutils is missing.

Unfortunatally there is no working dpkg on my DS414, so i´m not able to install it.........

:shock:
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Limit CPU usage?

Post by rednoah »

It's still Linux, can't not support / include niceness.

Code: Select all

$ uname -a
Linux DiskStation 3.2.40 #5644 Wed Jan 20 22:39:38 CST 2016 armv7l GNU/Linux synology_armada370_213j

Code: Select all

$ renice
BusyBox v1.16.1 (2015-10-28 13:24:11 CST) multi-call binary.

Usage: renice {{-n INCREMENT} | PRIORITY} [[-p | -g | -u] ID...]

Change priority of running processes

Options:
	-n	Adjust current nice value (smaller is faster)
	-p	Process id(s) (default)
	-g	Process group id(s)
	-u	Process user name(s) and/or id(s)

You can ask about the nice utility (or other ways to set process priority) in the Synology forums:
https://forum.synology.com/enu/
:idea: Please read the FAQ and How to Request Help.
hellmaker
Donor
Posts: 36
Joined: 13 Jan 2016, 20:43

Re: Limit CPU usage?

Post by hellmaker »

mhhh yes i was able to renice my tv server with -5.

But there is no way to proof it. Even top doesn´t show me nice settings.........
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Limit CPU usage?

Post by rednoah »

You're using top? You're in for a treat! :ugeek:

Code: Select all

htop
:idea: Please read the FAQ and How to Request Help.
hellmaker
Donor
Posts: 36
Joined: 13 Jan 2016, 20:43

Re: Limit CPU usage?

Post by hellmaker »

OMG htop is so awesome!!!!!!!!!!!!!!!

Ok it´s niced correctly. Need to create a test situation with hight tv server load........
Post Reply