General question to developers re: wine priority setting

Questions about Wine on Linux
Locked
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

General question to developers re: wine priority setting

Post by Bob Wya »

Hi,

Recently I got a bit fed-up with KDE Desktop effects causing stuttering when I was watching videos. So I did some digging on how to set priorities for user run programs (rather than root - which I had only previously done). So after a bit of experimentation I found a priority of -10 worked extremely well for my video players...

Then I thought can I apply the same logic to Wine?? Especially on my Intel 920 CPU-based system (4-core, 8-threaded @3.6Ghz) with multiple 830 SSDs I still see a lot of stuttering issues on Wine (e.g. from texture loading within game levels). I guess we know this is partly because the graphics translation layer is not multi-threaded. Also all the Wine processes run at a disadvantage vs the Linux kernel modules since they are in running in User Space (and can be pre-empted randomly and have larger context switching overheads).

So after my rambling intro... Just wondering why a Google search, for Wine optimisation, isn't getting any hits for running Wine processes at a priority like -10 (a level at which they don't compete with Pulseaudio - which is typically run a priority of -11)?? I don't see any blogs or FAQ's even mentioning this idea... Yet I am seeing unplayable frame rates and high-levels of frame-stuttering jump to playable frame rates and much smoother in-level texture loading. Is there a reason why this isn't a recommended practice for multi-core CPUs (especially when paired with SSDs)??

I should add I have quite a weak graphics card (8800 GTX) - in terms of much more recent Nvidia generations... But this seems to be less of an issue than the CPU-bounding bottlenecks introduced by the Wine translation layers... My frame-rates are actually quite close to running games natively under Windows 7 (on the same hardware) - when running Wine with a process priority optimisation.

Thanks
Bob
User avatar
dimesio
Moderator
Moderator
Posts: 13209
Joined: Tue Mar 25, 2008 10:30 pm

Re: General question to developers re: wine priority setting

Post by dimesio »

I'm not a Wine developer, but I can give you my take on it as an experienced user.

I've seen the suggestion to try adjusting the niceness in a few AppDB test reports/howtos, and if that helped you for specific games/apps, you should definitely mention it when filing test reports.

As to why it's not a blanket recommendation here, most Wine apps work just fine at the default setting, and there are lots of possible reasons for performance problems. After reading your post I tested -10 niceness on an online game I play that has noticeable stuttering when moving through heavily populated areas, and it made absolutely no difference. I also have never had problems with stuttering video in native apps, so I think you may be dealing with issues specific to your system (possibly related those multiple SSDs, which I don't have).

In general, I'd say it's worth a try along with all the other performance-enhancing suggestions, but it's not a panacea.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: General question to developers re: wine priority setting

Post by Bob Wya »

dimesio wrote:...
In general, I'd say it's worth a try along with all the other performance-enhancing suggestions, but it's not a panacea.
Hi,

Sure that's fair enough... I'll do some further testing anyway. I need to graph the threading resource use of some games - running wine with and without the optimisation. I suspect it's just effectively booting "crap" (KDE processes, etc.) off one CPU core - so wine gets a bigger slice of the pie (less context switching on that core for example). It's probably significant that my system has a mucher weaker GPU (Nvidia 8800GTX) vs CPU (core i7 920 @3.6Ghz). So my rig is probably fully GPU bound - after the fix - rather than some combination of. (Idle speculation at this point of course...)

Also I've only tested this on local games and videos played over Gb LAN (so like a <1ms latency hop). Doing anything online introduces another variable - the Internet!!

Thanks
Bob
Locked