How to set mximum allowed CPU time for a process ?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to set mximum allowed CPU time for a process ?
Hello
I am trying to play Heroes Of Might and Magic III (under wine) and after some hours of play my system just rebooted.
I looked for the CPU temp and it was 46 °C.
I know this game uses 100% CPU time, even though it gets more FPS than needed, and I think it over-heats my system.
Is there a way to tell my system that process 3851 can only have 25% CPU time and no more (like the task scheduler to suspend it 10 times per second for 75ms each and only let it run 25ms) ?
Simply setting the process to low priority would not help.
I think it would not be complicated to write a program that suspends and resumes a process many times per second, as long as you know the API. Has anyone had a need for something like this before ?
46°C isn't hot. To be honest, it's not even warm for a modern processor. As a data point, my Athlon box runs at about 45 degrees at idle, and can get up to 65 under load.
I'd be more inclined to think that you've got some dodgy RAM, or a failing power supply.
How am I supposed to use cgroups ? There is no such command ...
I thought 46 deg. C are not much, but then again during the time my system rebooted, twice, maybe the cooler did its job.
And anyway Heroes III does take up 100% CPU time, as system information shows me, and I had no way to stop it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.