Can I safely reduce CPU usage with kill -SIGSTOP?












0















I have 7 differents workspaces and each of them have a different purpose.



But everything runs in the background... For exemple the workspace 5 with my browser is using CPU even when I'm on workspace 2. Which I find ridiculous. (I'm using a simple terminal and my cpu is at ~20% for some stupid JS running on another workspace.)



I'm using a script now to switch between workspaces, and it triggers a series of kill -SIGSTOP $(pidof PROGRAM) and -SIGCONT only the programs of the current workspace.



My CPU usage has decreased significantly, but are there any drawbacks of doing this?



Can a long term STOPPED process cause any trouble somehow?



Is there a more conventional way of doing the same thing?










share|improve this question

























  • Can avoid running many apps be an alternative? I usually only keep a couple of terminals and the web browser with 2-3 tabs at most.

    – Rui F Ribeiro
    Jan 14 at 13:22













  • I have a lot of them, but I still need them to be available instantly. I'm fine if they just wait in RAM but I can't let them change my overall system responsiveness. + laptop battery

    – bob dylan
    Jan 14 at 13:36


















0















I have 7 differents workspaces and each of them have a different purpose.



But everything runs in the background... For exemple the workspace 5 with my browser is using CPU even when I'm on workspace 2. Which I find ridiculous. (I'm using a simple terminal and my cpu is at ~20% for some stupid JS running on another workspace.)



I'm using a script now to switch between workspaces, and it triggers a series of kill -SIGSTOP $(pidof PROGRAM) and -SIGCONT only the programs of the current workspace.



My CPU usage has decreased significantly, but are there any drawbacks of doing this?



Can a long term STOPPED process cause any trouble somehow?



Is there a more conventional way of doing the same thing?










share|improve this question

























  • Can avoid running many apps be an alternative? I usually only keep a couple of terminals and the web browser with 2-3 tabs at most.

    – Rui F Ribeiro
    Jan 14 at 13:22













  • I have a lot of them, but I still need them to be available instantly. I'm fine if they just wait in RAM but I can't let them change my overall system responsiveness. + laptop battery

    – bob dylan
    Jan 14 at 13:36
















0












0








0








I have 7 differents workspaces and each of them have a different purpose.



But everything runs in the background... For exemple the workspace 5 with my browser is using CPU even when I'm on workspace 2. Which I find ridiculous. (I'm using a simple terminal and my cpu is at ~20% for some stupid JS running on another workspace.)



I'm using a script now to switch between workspaces, and it triggers a series of kill -SIGSTOP $(pidof PROGRAM) and -SIGCONT only the programs of the current workspace.



My CPU usage has decreased significantly, but are there any drawbacks of doing this?



Can a long term STOPPED process cause any trouble somehow?



Is there a more conventional way of doing the same thing?










share|improve this question
















I have 7 differents workspaces and each of them have a different purpose.



But everything runs in the background... For exemple the workspace 5 with my browser is using CPU even when I'm on workspace 2. Which I find ridiculous. (I'm using a simple terminal and my cpu is at ~20% for some stupid JS running on another workspace.)



I'm using a script now to switch between workspaces, and it triggers a series of kill -SIGSTOP $(pidof PROGRAM) and -SIGCONT only the programs of the current workspace.



My CPU usage has decreased significantly, but are there any drawbacks of doing this?



Can a long term STOPPED process cause any trouble somehow?



Is there a more conventional way of doing the same thing?







linux cpu kill signals






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 14 at 12:43









peterh

4,429102957




4,429102957










asked Jan 14 at 12:33









bob dylanbob dylan

5261615




5261615













  • Can avoid running many apps be an alternative? I usually only keep a couple of terminals and the web browser with 2-3 tabs at most.

    – Rui F Ribeiro
    Jan 14 at 13:22













  • I have a lot of them, but I still need them to be available instantly. I'm fine if they just wait in RAM but I can't let them change my overall system responsiveness. + laptop battery

    – bob dylan
    Jan 14 at 13:36





















  • Can avoid running many apps be an alternative? I usually only keep a couple of terminals and the web browser with 2-3 tabs at most.

    – Rui F Ribeiro
    Jan 14 at 13:22













  • I have a lot of them, but I still need them to be available instantly. I'm fine if they just wait in RAM but I can't let them change my overall system responsiveness. + laptop battery

    – bob dylan
    Jan 14 at 13:36



















Can avoid running many apps be an alternative? I usually only keep a couple of terminals and the web browser with 2-3 tabs at most.

– Rui F Ribeiro
Jan 14 at 13:22







Can avoid running many apps be an alternative? I usually only keep a couple of terminals and the web browser with 2-3 tabs at most.

– Rui F Ribeiro
Jan 14 at 13:22















I have a lot of them, but I still need them to be available instantly. I'm fine if they just wait in RAM but I can't let them change my overall system responsiveness. + laptop battery

– bob dylan
Jan 14 at 13:36







I have a lot of them, but I still need them to be available instantly. I'm fine if they just wait in RAM but I can't let them change my overall system responsiveness. + laptop battery

– bob dylan
Jan 14 at 13:36












0






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%2f494404%2fcan-i-safely-reduce-cpu-usage-with-kill-sigstop%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f494404%2fcan-i-safely-reduce-cpu-usage-with-kill-sigstop%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 make a Squid Proxy server?

Is this a new Fibonacci Identity?

19世紀