Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
Without really knowing the details of how cpulimit operates and how ps measures or reports CPU utilization:
cpulimit seems to work by stopping and continuing a process with signals. This is a crude method that can’t yield very precise results in my opinion. For example, it heavily depends on the overall CPU load how quickly cpulimit can send the signal, and how quickly the signal is delivered. Another factor: The wine process might not always be in a state that permits it to react to a stop signal. I’d say that in your case, getting 20% to 30% is not bad at all.
Have you tried launching cpulimit with a lower number?
A more sophisticated and probably finer-grained method of controlling CPU usage is cgroups.
is limiting the cpu available to wine, not to MyProgram.exe.
in fact yes, i limit my .exe which i run with wine, so yeah, wine is affect limiting.
Is this ok? Is there a better method for doing it?
I find this,but not seems to give results.
in fact yes, i limit my .exe which i run with wine, so yeah, wine is affect limiting.
Is this ok? Is there a better method for doing it?
I find this,but not seems to give results.
I think you missed my point. It's not the .exe that's being limited at all. It is wine that's being limited. wine is not affecting limiting...it is the program being limited.
Have you compared the cpu usage with and without cpulimit? Is there no difference at all?
Have you tried using the -v verbose option to see what's happening?
I think you missed my point. It's not the .exe that's being limited at all. It is wine that's being limited. wine is not affecting limiting...it is the program being limited.
Have you compared the cpu usage with and without cpulimit? Is there no difference at all?
Have you tried using the -v verbose option to see what's happening?
now i think u are right. A slight difference. I red somewhere that wine use only 1 core, maybe that is issue, don't know really.
So it reach to 40%, even if I limit it to 20. Also you can see that I tried to use nice and give a more priority but no affect at all.
My program is working slowly and can freeze a sec and come back and so on. Cpu goes very high..
[snip]
My program is working slowly and can freeze a sec and come back and so on. Cpu goes very high..
That's how cpulimit works: from man cpulimit
Code:
· cpulimit always sends the SIGSTOP and SIGCONT signals to a process, both to verify
that it can control it and to limit the average amount of CPU it consumes. This can
result in misleading (annoying) job control messages that indicate that the job has
been stopped (when actually it was, but immediately restarted). This can also cause
issues with interactive shells that detect or otherwise depend on SIGSTOP/SIGCONT.
· cpulimit always sends the SIGSTOP and SIGCONT signals to a process, both to verify
that it can control it and to limit the average amount of CPU it consumes. This can
result in misleading (annoying) job control messages that indicate that the job has
been stopped (when actually it was, but immediately restarted). This can also cause
issues with interactive shells that detect or otherwise depend on SIGSTOP/SIGCONT.
cpulimit seems to work by stopping and continuing a process with signals. This is a crude method that can’t yield very precise results in my opinion. For example, it heavily depends on the overall CPU load how quickly cpulimit can send the signal, and how quickly the signal is delivered. Another factor: The wine process might not always be in a state that permits it to react to a stop signal. I’d say that in your case, getting 20% to 30% is not bad at all.
Have you tried launching cpulimit with a lower number?
A more sophisticated and probably finer-grained method of controlling CPU usage is cgroups.
totally agree.
i'm using cpulimits, but it's really not precise at all.
personally, i'm not going to start with cgroups for one single application that regularly gets my cpu fans spinning... crude is sufficient.
that said, i'm not sure it's a good idea to use that with wine.
totally agree.
i'm using cpulimits, but it's really not precise at all.
personally, i'm not going to start with cgroups for one single application that regularly gets my cpu fans spinning... crude is sufficient.
that said, i'm not sure it's a good idea to use that with wine.
tomislav91, why do you need to limt that program?
i know that i maybe have a better option for using this app, but right now i am stuck with it and need to solve this issue of getting cpu at 100%
Look just one little period
I maybe dont need to limit it but dont have solution for being cpu so busy cause this app. I am sure that in app is not problem, within system is. I tried with new ubuntu 18 and ddr4 4gb ram and it is the same, so its strange, it looks that app is problem, but it is not, cause i am having problem on several workstation. internet is also good.
Don't have idea what to try to improve...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.