http://bugs.winehq.org/show_bug.cgi?id=22503
Summary: wineserver: massive amount of rescheduling interupts / context switches on +1.8GB application load ( both wine32 / wine64 ) Product: Wine Version: 1.1.43 Platform: All OS/Version: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: wineserver AssignedTo: wine-bugs@winehq.org ReportedBy: djamu@hotmail.com
Created an attachment (id=27570) --> (http://bugs.winehq.org/attachment.cgi?id=27570) memory usage vs CPU load from 2.1GB to 1.7GB RAM
Wineserver creates a massive amount of rescheduling interupts / context switching when using + 1.8GB RAM application load, both on Wine32 and the Wine64 versions ( meaning the 64 bit Wine, not the 32 bit for 64bit systems ) The rescheduling becomes very apparant when going over 2GB RAM usage, and will effectively hog down an SMP processor to a crawl.
For a long time I've been using Wine to succesfully run various brands of renderers ( Lightwave / Maya / Fryrender / Maxwell ... )
The problem exists already for a long time, but became very apparant when I recently switched (compiled) to Wine64 because of a big project. ( Previous projects never needed the amount of ram needed for the current one )
Reverting back to Wine32 bit ( which should run fine as long as I stay under 4GB ) showed me the exact same slow down, except that on wine32 "top" for some reason doesn't show visually wineserver consuming a lot of resources ( only visible on Wine64 ) ... nevertheless the amount of rescheduling interupts and context switches skyrocket at exact the same loads for both versions.
This behaviour is visible on various ( CLI based ) multithreaded renderers which makes me confident in believing it is not related to a renderer specific DLL.
I would flag this bug as major as in quite a short while other applications / games will encounter the same issue.
I know a fair share of programming and can do some debugging, but I'm not very familiar with all the Wine components / not sure what logs / graphs I should submit ( I've got quite a few ). Any debug commands to pinpoint the problem are usefull too.
The added graph shows the CPU load/interupts whith variable memory usage from +2.1GB to +1.7GB on a compute node > the lower the memory usage, the higher the CPU load. ( ignore the halted state between 8.30PM/5AM )
Thx
Jan Van Haute
http://bugs.winehq.org/show_bug.cgi?id=22503
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|wineserver |-unknown Platform|All |Other Severity|major |normal
--- Comment #1 from Vitaliy Margolen vitaliy@kievinfo.com 2010-04-27 00:17:54 --- So, what exactly the problem? And why would you think that wineserver shouldn't have too many context switches? After all it's the Wine's "kernel" and mos every function that deals with handles or GUI calls it.
Note that Wine64 is still in alpha and does contain number of issues.
http://bugs.winehq.org/show_bug.cgi?id=22503
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID
--- Comment #2 from Dmitry Timoshkov dmitry@codeweavers.com 2010-04-27 04:07:45 --- wineserver is a separate application, and there is a context switch for every wineserver call. That's how it works.
http://bugs.winehq.org/show_bug.cgi?id=22503
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Dmitry Timoshkov dmitry@codeweavers.com 2010-04-27 04:07:57 --- Closing invalid.
http://bugs.winehq.org/show_bug.cgi?id=22503
djamu djamu@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |UNCONFIRMED Resolution|INVALID |
--- Comment #4 from djamu djamu@hotmail.com 2010-04-27 07:41:35 --- (In reply to comment #3)
Closing invalid.
"wineserver is a separate application, and there is a context switch for every wineserver call. That's how it works."
I'm well aware of the function of wineserver. It's not a matter of context switches, it's a matter of rescheduling interupts. It doesn't happen when the memory load is under 1.8GB ( 8 threads ) > the average amount of rescheduling interupts is then 281/s.
There seems to be a treshold regarding a 2GB limit > then the rescheduling starts to spike to 2.29k/s ( I've observed situations with 10k/s rescheduling effectivily halting the proccess to a crawl )
I've thoroughly investigated the issue, do not reject this long term issue without testing. This issue exists in both wine32 wine64 so just answering wine64 is in alpha is not a valid answer I can supply you with all the programs to generate this kind of load, ( as there aren't that many ) > or just fire up the windows version of blender and render a scene >
http://bugs.winehq.org/show_bug.cgi?id=22503
--- Comment #5 from Jeff Zaroyko jeffz@jeffz.name 2010-04-27 07:53:43 --- have you tried profiling this with oprofile?
http://bugs.winehq.org/show_bug.cgi?id=22503
--- Comment #6 from djamu djamu@hotmail.com 2010-04-27 08:08:19 --- (In reply to comment #5)
have you tried profiling this with oprofile?
no, how does that work ?
http://bugs.winehq.org/show_bug.cgi?id=22503
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID
--- Comment #7 from Dmitry Timoshkov dmitry@codeweavers.com 2010-04-27 09:20:03 --- (In reply to comment #4)
There seems to be a treshold regarding a 2GB limit > then the rescheduling starts to spike to 2.29k/s ( I've observed situations with 10k/s rescheduling effectivily halting the proccess to a crawl )
Wine has nothing to do with that, Linux kernel does.
http://bugs.winehq.org/show_bug.cgi?id=22503
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Dmitry Timoshkov dmitry@codeweavers.com 2010-04-27 09:20:22 --- Closing invalid.
http://bugs.winehq.org/show_bug.cgi?id=22503
djamu djamu@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |UNCONFIRMED Component|-unknown |wineserver Resolution|INVALID | Severity|normal |major
--- Comment #9 from djamu djamu@hotmail.com 2010-04-27 09:40:12 --- (In reply to comment #7)
(In reply to comment #4)
There seems to be a treshold regarding a 2GB limit > then the rescheduling starts to spike to 2.29k/s ( I've observed situations with 10k/s rescheduling effectivily halting the proccess to a crawl )
Wine has nothing to do with that, Linux kernel does.
Oh really, Then tell me why wineserver consumes about 46%CPU time ONLY when the process load goes over 2GB slowing down the running process considerably ... below 1.8GB wineserver barely consumes any cycles. This is not limited to a specific application.
That hardly makes wine not being involved, your argumentation is invalid.
I'm currently trying to figure out all options for Oprofile, any other constructive suggestion on tracking the issue is welcome.
http://bugs.winehq.org/show_bug.cgi?id=22503
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Component|wineserver |-unknown Resolution| |INVALID Severity|major |minor
--- Comment #10 from Dmitry Timoshkov dmitry@codeweavers.com 2010-04-27 09:47:03 --- (In reply to comment #9)
Wine has nothing to do with that, Linux kernel does.
Oh really, Then tell me why wineserver consumes about 46%CPU time ONLY when the process load goes over 2GB slowing down the running process considerably ... below 1.8GB wineserver barely consumes any cycles.
You better ask that question to linux kernel developers, that's where all scheduling and context switching happens.
Invalid, do not reopen.
http://bugs.winehq.org/show_bug.cgi?id=22503
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #11 from Dmitry Timoshkov dmitry@codeweavers.com 2010-04-27 09:47:20 --- Closing invalid.