Is it possible to run a program e.g. xz in the background so it wouldn't suck all the system's resources?


You can change the priority for running processes. The lower the nice value, the more resources are allocated to that task above others. Setting a higher positive value (I believe this is measured from -20 to +19) would allocate almost no resources to the task, and it will be processed only when there is nothing else to be done.


How To Limit Resources Using cgroups on CentOS 6
If you don't want your program to suck all the system resources then you can use cgroups (example of how to use cgroups in Centos 6) to limit the resources. You may also want to set higher nice value so that your cpu only process it when less task are present to execute.

  • Welcome to superuser: This only provides an answer for Centos, while this is a good addon for the question and searchers other than a sole answer for an accepted question. Poss comment. Please take a couple of minutes and read:- superuser.com/help .Answering: superuser.com/help/how-to-answer, again welcome to superuser.Thankyou – mic84 Jun 5 '18 at 8:17
  • Thanks for feedback. Although the link says its for Centos6 but its not different for any other distribution. – shubham0d Jun 5 '18 at 10:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.