Poor performance on smp system

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
winefan
Newbie
Newbie
Posts: 2
Joined: Fri Dec 05, 2008 4:18 pm

Poor performance on smp system

Post by winefan »

Hello,

I have a win32 console program running on wine-1.1.7-1.12 (openSuSE 11.1 rc1)
using two cpus.

While the results are ok the performance of this program is very poor.

After some testing and comparing with windows I have found:
The program writes out its results on ascii files from time to time. This writing
phase obviously takes much(!) longer on wine as on windows. And during
this phase my cpu load is ~100% (i.e. one cpu is idle). My program and wineserver
are about ~50% each. So it is clear, where it looses its performance.

Running with WINEDEBUG=+warn, all a lot of KERNEL32.WaitForSingleObject,
KERNEL32.InterlockedExchange and KERNEL32.ReleaseMutex messages show up
(see logfile attached).

What is going on here?

Markus
--
Sensationsangebot verlängert: GMX FreeDSL - Telefonanschluss + DSL
für nur 16,37 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K1308T4569a
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Logfile.gz
Type: application/x-gzip
Size: 1306 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-us ... chment.bin
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Poor performance on smp system

Post by vitamin »

winefan wrote:Running with WINEDEBUG=+warn
Don't do that! You enabling heap "filler" - functions that fill released heap space with some byte pattern. It SIGNIFICANTLY reduces performance.

If your program still works slower on Wine, you should look at what exactly you doing. And how to optimize it/change it. Some operations will always be slower on Wine because they have to go through or touch wineserver. On windows that would be kernel, on Wine it's a separate single-threaded process.
winefan
Newbie
Newbie
Posts: 2
Joined: Fri Dec 05, 2008 4:18 pm

Post by winefan »

Hello,

you may have misunderstood me.

I added the WINEDEBUG after I saw its poor performance. With debug options it will run much slower, of course.
If your program still works slower on Wine, you should look at what exactly you doing.
See my attachment.

I am not familiar with the internals of wine. Seems my program is doing a lot of some kind of synchronisation between threads. Why is something time critical like this handled by a server process?

Markus
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Post by oiaohm »

Kinda the Incorrect question. Winefan.

Wineserver is single threaded. There is a bug bear and a half.

Going threw a multi threaded server would not have as much hit. Windows kernel is multi threaded wine replacement is not. Nice big annoying defect.

It has to go to a server because under windows design kernel calls like all OS have a different memory space to applications. So yes there is information wineserver has that when security is built into wine your application will not in allowed to access.

What is the bug number for wineserver to be converted from single threaded to multi-able. Because this could be another application to add to it as needing it fixed.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

winefan wrote:See my attachment.
It's useless.
winefan wrote:some kind of synchronisation between threads.
What _exactly_ are you doing?
Locked