CyberPanel Community

IncScheduler eating all my server's CPU

Ca
CaptainMorgan #1

I’m using a VPS with 2 CPUs. But I noticed there are two instances of IncScheduler running and using 99% CPU.

I assume they’re for the local scheduled backup I have set up. Is there a way to limit the amount of CPU these processes will use or to limit it to only a single instance?

8 replies
sh
shoaibkk #2

seems you have set a scheduled backup and on the time of backups creation usage is always high

Ca
CaptainMorgan #3

Yes I know I’ve scheduled a backup :slight_smile: My question is can I set a limit of how much CPU it is using, or limit the number of processes it starts? Currently it is starting two instances (I’m assuming it starts 1 per CPU?).

ri
richardevcom #4

You could use any of these three options available to limit any process CPU usage (be aware that this will prolong the backup process):

  1. nice <process>
  2. cpulimit -l 60 <process>
  3. control groups (Cgroups)
sudo cgcreate -g cpu:/restrained
sudo cgset -r cpu.shares=768 restrained
sudo cgexec -g cpu: restrained <process>
Ca
CaptainMorgan #5

Thanks, for am I putting the path to the python file?

ri
richardevcom #6
nice python_script_name
cpulimit -l 60 -p `pgrep -f python_script_name\.py`
Ca
CaptainMorgan #7

Thanks, where do I put this? Is the backup started by a cron task?

sh
shoaibkk #8

i suggest you to not set any limit and let it be done normally but if you set limit it will take whole day to complete

Ca
CaptainMorgan #9

It’s taking down my site when using 99% CPU. Why is it so inefficient? I’m only running a local backup.

Sign in to reply