Starcraft and Diablo II use a lot of CPU power

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
belegdol
Level 1
Level 1
Posts: 5
Joined: Thu Jul 31, 2008 4:18 pm

Starcraft and Diablo II use a lot of CPU power

Post by belegdol »

Hello,

I am running Wine 1.0 under Fedora 9 x86_64. The problem is that the two mentioned games use a lot of CPU power about 50 % on a 2 Ghz Core 2 Duo. At first I thought this is caused by GDI DirectDraw renderer, but changing to opengl did not help. Also, it is just the same when you configure Diablo to use Direct3D renderer. Does anybody has any idea where can I look for the source of this problem? Warming up the CPU just for fun isn't that cool after all ;) Cheers.
John Drescher

Starcraft and Diablo II use a lot of CPU power

Post by John Drescher »

On Thu, Jul 31, 2008 at 5:26 PM, belegdol <[email protected]> wrote:
Hello,

I am running Wine 1.0 under Fedora 9 x86_64. The problem is that the two mentioned games use a lot of CPU power about 50 % on a 2 Ghz Core 2 Duo. At first I thought this is caused by GDI DirectDraw renderer, but changing to opengl did not help. Also, it is just the same when you configure Diablo to use Direct3D renderer. Does anybody has any idea where can I look for the source of this problem? Warming up the CPU just for fun isn't that cool after all ;) Cheers.
Run starcraft in its own X session at 640x480 and 8 bit color and you
will get better performance.

John
belegdol
Level 1
Level 1
Posts: 5
Joined: Thu Jul 31, 2008 4:18 pm

Post by belegdol »

I can try that, but I thought using opengl ddraw renderer was supposed to solve problems with different colour depths, wasn't it? At least that's what the wiki says.
John Drescher

Starcraft and Diablo II use a lot of CPU power

Post by John Drescher »

On Thu, Jul 31, 2008 at 7:01 PM, belegdol <[email protected]> wrote:
I can try that, but I thought using opengl ddraw renderer was supposed to solve problems with different colour depths, wasn't it? At least that's what the wiki (http://wiki.winehq.org/DirectDraw) says.
I think this depends on you graphics card. If you have intel graphics
or an older Radeon card and some Geforce cards you will not have the
acceleration necessary so the conversion will be done by the CPU.

John
Jochen

Starcraft and Diablo II use a lot of CPU power

Post by Jochen »

belegdol schrieb:
Hello,

I am running Wine 1.0 under Fedora 9 x86_64. The problem is that the
two mentioned games use a lot of CPU power about 50 % on a 2 Ghz Core
2 Duo. At first I thought this is caused by GDI DirectDraw renderer,
but changing to opengl did not help. Also, it is just the same when
you configure Diablo to use Direct3D renderer. Does anybody has any
idea where can I look for the source of this problem? Warming up the
CPU just for fun isn't that cool after all ;) Cheers.
Many older games that are programmed for Windows and DOS use busy-wait
polling for the input devices, such as the mouse. busy-wait polling
means that the program will do nothing, but ask the input ports for new
data. This kind of polling causes a CPU usage of 100% (single core, 50%
dual core, 25% quad core). It does not matter how fast the CPU is, the
program will consume it all. I am pretty sure if you would run these
games on windows, the task manager would report the same. Many old DOS
games behave this way, but usually in emulators like dosbox you can
reduce the cpu cycles the emulator can use. That will then reduce the
CPU load. But of course WINE is not an emulator ;) I am pretty sure
there are tools for managing the maximum CPU load a program is allowed
to take, but I have seen something like that only for big Sun machines
so far. I doubt you are trying to play Starcraft on a T1000 ;)

So in short: it is no wine problem, but a design decision of the makers
of the program at times where one application at the same time was all
you could possibly get and where CPU where mostly cooled without an
active fan.

bye Jochen
belegdol
Level 1
Level 1
Posts: 5
Joined: Thu Jul 31, 2008 4:18 pm

Re: Starcraft and Diablo II use a lot of CPU power

Post by belegdol »

John Drescher wrote:On Thu, Jul 31, 2008 at 7:01 PM, belegdol <[email protected]> wrote:
I can try that, but I thought using opengl ddraw renderer was supposed to solve problems with different colour depths, wasn't it? At least that's what the wiki (http://wiki.winehq.org/DirectDraw) says.
I think this depends on you graphics card. If you have intel graphics
or an older Radeon card and some Geforce cards you will not have the
acceleration necessary so the conversion will be done by the CPU.

John
For reference, I have a GeForce Go 7600 here. I will try separate X and see if it helps.
edit: I tried Separate X, Xnest and vncserver. Only the last one worked, but the CPU usage actually went up a bit.
John Drescher

Starcraft and Diablo II use a lot of CPU power

Post by John Drescher »

I think this depends on you graphics card. If you have intel graphics
or an older Radeon card and some Geforce cards you will not have the
acceleration necessary so the conversion will be done by the CPU.

John
For reference, I have a GeForce Go 7600 here. I will try separate X and see if it helps.
That should be new enough. I am not sure why that does not work.

John
perryh

Starcraft and Diablo II use a lot of CPU power

Post by perryh »

Many older games that are programmed for Windows and DOS use
busy-wait polling for the input devices, such as the mouse ...
it is no wine problem, but a design decision of the makers
of the program ...
Granted it is primarily caused by the program, but I think Wine
*could* do something to reduce the impact: before returning
"no input available" from one of these polling (non-blocking)
APIs, sleep for, say, 1/10 of a second.
Jochen

Starcraft and Diablo II use a lot of CPU power

Post by Jochen »

[email protected] schrieb:
Many older games that are programmed for Windows and DOS use
busy-wait polling for the input devices, such as the mouse ...
it is no wine problem, but a design decision of the makers
of the program ...
Granted it is primarily caused by the program, but I think Wine
*could* do something to reduce the impact: before returning
"no input available" from one of these polling (non-blocking)
APIs, sleep for, say, 1/10 of a second.
I am not too deep into those things. I know that about the CPU, because
I did see it with my own eyes for several games, especially DOS games or
Windows games, that are actually DOS games for the most part. Now for
windows there are several utilities available to set the priority of the
process, but I guess they would still need 100%, just make the game more
responsive. I am positive that this busy-wait polling has to go through
wine APIs at some time, But I don't know the wine sources and can't tell
where that should be, or if it is possible to limit the calls to them
there... that's something for the developers I think. And it would be a
feature request, not a bug report. Letting wine behave like windows is
not to be seen as bug in most cases ;)

bye Jochen
Locked