Hi Scott,
On Linux power management decisions are made by cpufreq governors. Most distributions I have used recently use the 'ondemand' scheduler, which makes decisions as you would guess based on cpu load. This scheduler has various parameters you can tweak in '/sys/devices/system/cpu/cpufreq/ondemand'. Its 'up_threshold' parameter is typically set to 95, which means when the load on a CPU reaches 95% it is time to increase the clock frequency to a higher level. Often this value is too high to trigger a high clock frequency. Just for fun adjust it to let's say 25 and see it change behaviour.
Figuring out the 'right' power settings is a very hard problem, because there are different use cases of which battery life vs performance is probably the most important one.
There is not much which can be done at the application level. If you were to tune cpufreq settings from Wine this would interfere with other apps.
Maybe some settings like up_treshold should be tuned at the distribution level, but finding the right balance is a problem and every user has different preferences.
Thanks, Roderick
On Fri, Sep 13, 2013 at 2:14 PM, Scott Ritchie scottritchie@ubuntu.comwrote:
Over the past couple years I've been able to try out Wine games on many different environments -- laptops, desktops, even cloud servers.
On many occasions, I've discovered that a game appears to run functionally but slowly, however upon further investigation I find that forcing the CPU to run at 100% "performance" mode can make the game playable.
There are a few tools to do this (eg cpufreq-indicator for desktop users), however the long and short of it is that, for many users, I suspect they just assume Wine is slow and give up on that particular game.
- Since Wine is truly CPU-bound here, why isn't it provoking the
autoscaling to actually speed up the processor? I've seen this happen on systems running with AC power and 100% battery life.
- Is this a kernel issue? A distribution power management
configuration issue? Or is there something we can do in Wine itself to be less courteous?
Mostly I've seen this on Ubuntu, however I'm sure it's affecting other distributions that have any sort of power managment whatsoever as it can be quite tricky to get this right.
Thanks, Scott Ritchie