Hello, for information I performed some tests trying to control YaCy CPU load on Debian with Systemd. So, according to SystemD documentation
, and because currently Debian services automatically rely on SystemD, it should be very easy to set a maximum limit on YaCy CPU load using this control configuration : "CPUQuota".
Indeed it is, and it worked very fine with only one command line (as root):
- Code: Alles auswählen
systemctl set-property yacy CPUQuota=30%
You can set any value you wish to CPUQuota, it is immediately used, and saved for eventual later restart. I checked this with a YaCy peer crawling, using "top" command. Note : the value meaning is not so obvious if your processor has multiple cores. For example with 4 cores :
- CPUQuota=400% : allow full load of all cores
- CPUQuota=200% : allow at most full use of two cores
- CPUQUota=50% : allow at most 50% use of one coreBut :
currently (2016-07-18) this only works on Debian Stretch (testing) which has systemd version 230 (you can check with "systemctl --version").
On Debian Jessie (stable, embedding systemd version 215) this should
works, but for some reason it does not! I guess the CPUQuota feature is quite young, and maybe has some bug in this version (only appear starting from systemd version 213