1

I am running some python scripts in my linux terminal that happen to be pretty resource intensive, but when I do my system will become pretty non-responsive until the process has completed. I know there are commands like nice and cpulimit but I haven't found a great way to just open a terminal that is somehow resource limited (and what percentage of resources can be devoted to it) and can be used to run any scripts during that particular session.

So is there a good way to do this?

    1 Answer 1

    3

    You can use setrlimit() from Python's built-in resource library to manage resource limits within your Python scripts.

    Alternatively, the setup you describe in your question sounds most like running a virtual machine (e.g. VirtualBox or VMware). You can specify what resources you want to allow your VM to use, then you can run whatever you want in there and have it quarantined from the rest of your system's resources.

      You must log in to answer this question.

      Start asking to get answers

      Find the answer to your question by asking.

      Ask question

      Explore related questions

      See similar questions with these tags.