Launch a program to only specific resources

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












Question:



How can I launch a program such that it only uses X ram and Y CPU cores, etc? I happen to be using Ubuntu in this case, but since I often am on other distros, I need a general GNU/Linux solution.



Example use:



I have a program, openscad, which I want to use to convert an image from 2D to 3D. It runs snappy enough on 50x50, but I would like 500x500, and this effectively takes down an i7 such that I cannot use other programs easily - such as the file manager or firefox. On an older machine, it was basically only responsive to kernel level reboot not even switching to a different virtual terminal with F1 etc.



Search so far:



I think what I am looking for is something called a "quota" manager, but I keep finding stuff for hard disk space, and I just want the computer to remain usable. I'm not sure exactly what I'm looking for but I know its effect. I found : what is the effect of setting cpu.cpu_quota_us in cpu cgroup? but it is unanswered - although it points to my solution maybe?










share|improve this question























  • I've now found: linoxide.com/linux-how-to/limit-cpu-usage-processes-linux .. but I'm not sure how to automate this. Thanks to @terdon for changing the tags to 'limit' which helped my seaching
    – wblan
    Dec 9 at 3:00







  • 1




    Have you tried just launching openscad with nice? That doesn't allow you to set specific limits, but it will run a program with a lower priority: nice openscad. That won't help if the problem is RAM, but it should make your system more responsive/ Let me know if that works and I can post an answer.
    – terdon
    Dec 9 at 3:05










  • Something like askubuntu.com/a/510936/158442 or askubuntu.com/a/94743/158442?
    – muru
    Dec 9 at 6:34














up vote
1
down vote

favorite












Question:



How can I launch a program such that it only uses X ram and Y CPU cores, etc? I happen to be using Ubuntu in this case, but since I often am on other distros, I need a general GNU/Linux solution.



Example use:



I have a program, openscad, which I want to use to convert an image from 2D to 3D. It runs snappy enough on 50x50, but I would like 500x500, and this effectively takes down an i7 such that I cannot use other programs easily - such as the file manager or firefox. On an older machine, it was basically only responsive to kernel level reboot not even switching to a different virtual terminal with F1 etc.



Search so far:



I think what I am looking for is something called a "quota" manager, but I keep finding stuff for hard disk space, and I just want the computer to remain usable. I'm not sure exactly what I'm looking for but I know its effect. I found : what is the effect of setting cpu.cpu_quota_us in cpu cgroup? but it is unanswered - although it points to my solution maybe?










share|improve this question























  • I've now found: linoxide.com/linux-how-to/limit-cpu-usage-processes-linux .. but I'm not sure how to automate this. Thanks to @terdon for changing the tags to 'limit' which helped my seaching
    – wblan
    Dec 9 at 3:00







  • 1




    Have you tried just launching openscad with nice? That doesn't allow you to set specific limits, but it will run a program with a lower priority: nice openscad. That won't help if the problem is RAM, but it should make your system more responsive/ Let me know if that works and I can post an answer.
    – terdon
    Dec 9 at 3:05










  • Something like askubuntu.com/a/510936/158442 or askubuntu.com/a/94743/158442?
    – muru
    Dec 9 at 6:34












up vote
1
down vote

favorite









up vote
1
down vote

favorite











Question:



How can I launch a program such that it only uses X ram and Y CPU cores, etc? I happen to be using Ubuntu in this case, but since I often am on other distros, I need a general GNU/Linux solution.



Example use:



I have a program, openscad, which I want to use to convert an image from 2D to 3D. It runs snappy enough on 50x50, but I would like 500x500, and this effectively takes down an i7 such that I cannot use other programs easily - such as the file manager or firefox. On an older machine, it was basically only responsive to kernel level reboot not even switching to a different virtual terminal with F1 etc.



Search so far:



I think what I am looking for is something called a "quota" manager, but I keep finding stuff for hard disk space, and I just want the computer to remain usable. I'm not sure exactly what I'm looking for but I know its effect. I found : what is the effect of setting cpu.cpu_quota_us in cpu cgroup? but it is unanswered - although it points to my solution maybe?










share|improve this question















Question:



How can I launch a program such that it only uses X ram and Y CPU cores, etc? I happen to be using Ubuntu in this case, but since I often am on other distros, I need a general GNU/Linux solution.



Example use:



I have a program, openscad, which I want to use to convert an image from 2D to 3D. It runs snappy enough on 50x50, but I would like 500x500, and this effectively takes down an i7 such that I cannot use other programs easily - such as the file manager or firefox. On an older machine, it was basically only responsive to kernel level reboot not even switching to a different virtual terminal with F1 etc.



Search so far:



I think what I am looking for is something called a "quota" manager, but I keep finding stuff for hard disk space, and I just want the computer to remain usable. I'm not sure exactly what I'm looking for but I know its effect. I found : what is the effect of setting cpu.cpu_quota_us in cpu cgroup? but it is unanswered - although it points to my solution maybe?







cpu limit resources cad






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 9 at 2:45









terdon

127k31246423




127k31246423










asked Dec 9 at 2:43









wblan

61




61











  • I've now found: linoxide.com/linux-how-to/limit-cpu-usage-processes-linux .. but I'm not sure how to automate this. Thanks to @terdon for changing the tags to 'limit' which helped my seaching
    – wblan
    Dec 9 at 3:00







  • 1




    Have you tried just launching openscad with nice? That doesn't allow you to set specific limits, but it will run a program with a lower priority: nice openscad. That won't help if the problem is RAM, but it should make your system more responsive/ Let me know if that works and I can post an answer.
    – terdon
    Dec 9 at 3:05










  • Something like askubuntu.com/a/510936/158442 or askubuntu.com/a/94743/158442?
    – muru
    Dec 9 at 6:34
















  • I've now found: linoxide.com/linux-how-to/limit-cpu-usage-processes-linux .. but I'm not sure how to automate this. Thanks to @terdon for changing the tags to 'limit' which helped my seaching
    – wblan
    Dec 9 at 3:00







  • 1




    Have you tried just launching openscad with nice? That doesn't allow you to set specific limits, but it will run a program with a lower priority: nice openscad. That won't help if the problem is RAM, but it should make your system more responsive/ Let me know if that works and I can post an answer.
    – terdon
    Dec 9 at 3:05










  • Something like askubuntu.com/a/510936/158442 or askubuntu.com/a/94743/158442?
    – muru
    Dec 9 at 6:34















I've now found: linoxide.com/linux-how-to/limit-cpu-usage-processes-linux .. but I'm not sure how to automate this. Thanks to @terdon for changing the tags to 'limit' which helped my seaching
– wblan
Dec 9 at 3:00





I've now found: linoxide.com/linux-how-to/limit-cpu-usage-processes-linux .. but I'm not sure how to automate this. Thanks to @terdon for changing the tags to 'limit' which helped my seaching
– wblan
Dec 9 at 3:00





1




1




Have you tried just launching openscad with nice? That doesn't allow you to set specific limits, but it will run a program with a lower priority: nice openscad. That won't help if the problem is RAM, but it should make your system more responsive/ Let me know if that works and I can post an answer.
– terdon
Dec 9 at 3:05




Have you tried just launching openscad with nice? That doesn't allow you to set specific limits, but it will run a program with a lower priority: nice openscad. That won't help if the problem is RAM, but it should make your system more responsive/ Let me know if that works and I can post an answer.
– terdon
Dec 9 at 3:05












Something like askubuntu.com/a/510936/158442 or askubuntu.com/a/94743/158442?
– muru
Dec 9 at 6:34




Something like askubuntu.com/a/510936/158442 or askubuntu.com/a/94743/158442?
– muru
Dec 9 at 6:34















active

oldest

votes











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f486875%2flaunch-a-program-to-only-specific-resources%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f486875%2flaunch-a-program-to-only-specific-resources%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?