http://bugs.winehq.org/show_bug.cgi?id=10731
Summary: Memory usage much higher than in Wndows Product: Wine Version: 0.9.50. Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: wine-binary AssignedTo: wine-bugs@winehq.org ReportedBy: atari@gabo.pl
Hearts of Iron 2 (Armageddon, Doomsday, Mod33) when running under Wine uses much more memory then when running under Windows (on my system it uses 117MB under Windows XP and about 3GB under Wine)
http://bugs.winehq.org/show_bug.cgi?id=10731
--- Comment #1 from Dmitry Timoshkov dmitry@codeweavers.com 2007-12-09 08:53:01 --- How do you measure the app's memory usage under Wine?
http://bugs.winehq.org/show_bug.cgi?id=10731
--- Comment #2 from Adam Klobukowski atari@gabo.pl 2007-12-09 08:59:44 --- By looking at Gnome System Monitor. There was 1GB of resident memory used, and up to 3GB (total) virtual memory used. Under Windows - it is the result from Task Manager. And it really felt that way (system went in slo-mo mode ;))
There is something really specific in this game: it uses a lot of small files (20000+). So maybe there is some leak, or memory usage inefficiency ?
http://bugs.winehq.org/show_bug.cgi?id=10731
Jonathan echidnaman@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |echidnaman@gmail.com
--- Comment #3 from Jonathan echidnaman@gmail.com 2007-12-09 11:24:38 --- If you'll look under the total memory used you'll see it isn't using anywhere near 3 GB.
Also, the place where I see 2 GB of memory being used is under the "Virtual memory" column. I'm guessing that for some reason that amount of virtual memory is somehow "reserved" but not used. In other words, I don't really think this is a bug.
http://bugs.winehq.org/show_bug.cgi?id=10731
--- Comment #4 from Adam Klobukowski atari@gabo.pl 2007-12-09 17:45:52 --- To test it on windows I used virtualized windows with 512MB RAM and it worked fine. With Wine, i see a very big difference, I really takes a lot of ram, an pushes other apps to swap (I have 2GB of RAM). If the allocation would really be virtual, it would not "push" disk cache, and eat additional 1GB of swap. Tomorrow I'll present "real" ps output.
http://bugs.winehq.org/show_bug.cgi?id=10731
--- Comment #5 from Adam Klobukowski atari@gabo.pl 2007-12-10 00:07:49 --- ps aux (for HoI2.exe)
adamk 9709 18.8 60.9 3094488 1265464 pts/0 SLl+ 07:00 0:45 HoI2.exe
I can provide any other information, just please state full command.
http://bugs.winehq.org/show_bug.cgi?id=10731
--- Comment #6 from Adam Klobukowski atari@gabo.pl 2007-12-29 08:18:38 --- Problem still exists in 0.9.52, but I've done an additional discovery.
The problem seems to be connected with audio: when I start Wine without any sound support, the memory usage is sane. If I turn the audio on (OSS, or Alsa, it does not matter) the memory usage skyrockets.
So I made a log with +wave, and I attach it.
http://bugs.winehq.org/show_bug.cgi?id=10731
--- Comment #7 from Adam Klobukowski atari@gabo.pl 2007-12-29 08:23:02 --- Created an attachment (id=9871) --> (http://bugs.winehq.org/attachment.cgi?id=9871) wine log
http://bugs.winehq.org/show_bug.cgi?id=10731
Igor Ulyanov (Displacer) disinbox@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |disinbox@gmail.com
--- Comment #8 from Igor Ulyanov (Displacer) disinbox@gmail.com 2008-01-07 10:12:12 --- I have the same problem with Apollo 37 sound player. According to htop it uses 3,6Gb virtual memory and 30 Mb resident memory.
http://bugs.winehq.org/show_bug.cgi?id=10731
James Hawkins truiken@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|_obsolete_binary |-unknown
http://bugs.winehq.org/show_bug.cgi?id=10731
--- Comment #9 from Marko Schulz harleen@gmx.de 2008-04-11 17:08:18 --- Europa Universalis III also has this problem (using wine 0.9.59). When the loading screen says "loading sounds" it will consume all memory and eventually crash. Disabling Audio for the game allows it to load.
http://bugs.winehq.org/show_bug.cgi?id=10731
Marko Schulz harleen@gmx.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #10 from Marko Schulz harleen@gmx.de 2008-04-26 07:27:10 --- *** This bug has been confirmed by popular vote. ***
http://bugs.winehq.org/show_bug.cgi?id=10731
Marko Schulz harleen@gmx.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |harleen@gmx.de
--- Comment #11 from Marko Schulz harleen@gmx.de 2008-05-17 17:04:34 --- The problem seems to be related to DSound. With debug output for dsound (WINEDEBUG=trace+dsound) you can see where the memory goes:
trace:dsound:DirectSoundDevice_AddBuffer buffer count is now 802
When this count reaches around 4000, the game crashes on my computer, because 2GB RAM and the swap are full.
Below is a part of the wine log with dsound trace. This log was created with the Europa Universalis III Demo, which can be downloaded from http://www.europauniversalis3.com/
------------ [before this, there are only lots and lots repetitions of the following line] trace:dsound:DSOUND_MixToPrimary MixToPrimary for 0x1b05f918, state=0 trace:dsound:DSOUND_MixToPrimary MixToPrimary for 0x1b27f910, state=0 trace:dsound:DSOUND_MixToPrimary MixToPrimary for 0x1b6bf578, state=0 trace:dsound:DSOUND_MixToPrimary MixToPrimary for 0x1b5af5b8, state=0 trace:dsound:DSOUND_MixToPrimary Mixed at least 0 from all buffers trace:dsound:norm16 0x14e0028 - 0x7d10e000 0 trace:dsound:DSOUND_timer completed processing at 170649, duration = 41 trace:dsound:DSOUND_timer (1,0,0x1333ef8,0x0,0x0) trace:dsound:DSOUND_timer entering at 170649 trace:dsound:DirectSoundDevice_AddBuffer buffer count is now 802 trace:dsound:SecondaryBufferImpl_Create (0x1b49f750,0xeef098) trace:dsound:IDirectSoundBufferImpl_AddRef (0x1b49f750) ref was 0 trace:dsound:SecondaryBufferImpl_AddRef (0x1b5af708) ref was 0 trace:dsound:IDirectSound8_IDirectSound8_DuplicateSoundBuffer (0x12c5638,0x16886550,0xeef298) trace:dsound:DirectSoundDevice_DuplicateSoundBuffer (0x1333ef8,0x16886550,0xeef298) trace:dsound:IDirectSoundBufferImpl_Duplicate (0x1333ef8,0x168863c0,0x168863c0) trace:dsound:DSOUND_RecalcFormat (0x1b8df558) trace:dsound:DSOUND_MixToTemporary (0x1b8df558, 0xf41b070) trace:dsound:DSOUND_MixToTemporary (0x1b8df558) Same sample rate 44100 = primary 44100 trace:dsound:DSOUND_PerformMix (0x1333ef8) trace:dsound:DSOUND_PrimaryGetPosition (0x1333ef8,0x7ca069b8,0x7ca069b4) trace:dsound:DSOUND_PrimaryGetPosition playpos = 0, writepos = 0 (0x1333ef8, time=170654) trace:dsound:DSOUND_PerformMix primary playpos=0, writepos=0, clrpos=0, mixpos=0, buflen=65536 trace:dsound:DSOUND_PerformMix prebuff_left = 0, prebuff_max = 10x2048=20480, writelead=0 trace:dsound:DSOUND_PerformMix Buffer starting or buffer underrun trace:dsound:DSOUND_MixToPrimary (0,20480,1) trace:dsound:DSOUND_MixToPrimary MixToPrimary for 0xaf08268, state=0 trace:dsound:DSOUND_MixToPrimary MixToPrimary for 0xb1ee120, state=0 trace:dsound:DSOUND_MixToPrimary MixToPrimary for 0xb1ee270, state=0 [stopped program here wit CTRL+C]
http://bugs.winehq.org/show_bug.cgi?id=10731
--- Comment #12 from knan-wine@anduin.net 2008-06-07 07:10:03 --- Looks related to #9612... Try the workaround registry setting in comment #21 there?
http://bugs.winehq.org/show_bug.cgi?id=10731
--- Comment #13 from Marko Schulz harleen@gmx.de 2008-06-08 09:06:28 --- Setting that registry key fixes the problem in Europa Universalis 3 and Europa Universalis - Rome. (using wine-rc4) These bugs indeed seem to be duplicates.
http://bugs.winehq.org/show_bug.cgi?id=10731
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE
--- Comment #14 from Vitaliy Margolen vitaliy@kievinfo.com 2008-06-12 23:38:54 --- Duplicate then
*** This bug has been marked as a duplicate of bug 9612 ***
http://bugs.winehq.org/show_bug.cgi?id=10731
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #15 from Austin English austinenglish@gmail.com 2008-10-29 14:18:20 --- Closing abandoned.
http://bugs.winehq.org/show_bug.cgi?id=10731
Raymond superquad.vortex2@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |superquad.vortex2@gmail.com
--- Comment #16 from Raymond superquad.vortex2@gmail.com 2010-09-17 22:40:21 CDT --- trace:wave:OSS_WaveOutInit /dev/mixer: PulseAudio Virtual OSS trace:wave:OSS_Info Formats=0000003b ( AFMT_MU_LAW AFMT_A_LAW AFMT_U8 AFMT_S16_LE AFMT_S16_BE ) trace:wave:OSS_Info Caps=00005100 trace:wave:OSS_Info Revision: 0 trace:wave:OSS_Info Duplex: true trace:wave:OSS_Info Realtime: false trace:wave:OSS_Info Batch: false trace:wave:OSS_Info Coproc: false trace:wave:OSS_Info Trigger: true trace:wave:OSS_Info Mmap: false trace:wave:OSS_Info Multi: true trace:wave:OSS_Info Bind: false
wineoss.drv assume that sound card support hardware mixing when DSP_CAP_MULTI: true ( support multi open )
#ifdef DSP_CAP_MULTI /* not every oss has this */ /* check for hardware secondary buffer support (multi open) */ if ((arg & DSP_CAP_MULTI) && (ossdev->out_caps.dwSupport & WAVECAPS_DIRECTSOUND)) { TRACE("hardware secondary buffer support available\n");
ossdev->ds_caps.dwMaxHwMixingAllBuffers = 16; ossdev->ds_caps.dwMaxHwMixingStaticBuffers = 0; ossdev->ds_caps.dwMaxHwMixingStreamingBuffers = 16;
ossdev->ds_caps.dwFreeHwMixingAllBuffers = 16; ossdev->ds_caps.dwFreeHwMixingStaticBuffers = 0; ossdev->ds_caps.dwFreeHwMixingStreamingBuffers = 16; } #endif
For ALSA OSS emulation , this mean that your ALSA sound card driver has multi subdevices
static int snd_pcm_oss_get_caps1(struct snd_pcm_substream *substream, int res) { if (substream == NULL) { res &= ~DSP_CAP_DUPLEX; return res; } #ifdef DSP_CAP_MULTI if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) if (substream->pstr->substream_count > 1) res |= DSP_CAP_MULTI; #endif