pauleve/docker-mtgo

WINEARCH win32? 64bit would have more memory

chadfurman opened this issue · 7 comments

I keep running out of ram / wine keeps swapping and slows way down. I see in the docker-wine Dockerfile that it's set to WINEARCH win32 -- is this necessary? Have you tried it without?

I'm asking rather than trying it myself, and I'm sorry. I can try it myself "later" and let you know -- just curious if there's any reason you don't have it set as the default?

Unfortunately, win32 is required so far, as the MTGO executable is a 32bits one.
I have hope that we'll soon be able to get rid of it with the "wow64" effort of wine developers, which will enable running win32 executables on any architecture.
I'm giving a try regularly, with no success so far.

Regarding memory usage, mtgo is quite demanding. What is your hardware?
Do you observe an increase usage over time (maybe involving some memory leak), or is it occurring quickly after starting matches?

You may give a try to the option --limit-cpus 2 to reduce memory footprint.

It's definitely a memory leak. I have no problems for the first hour, but if I leave the application running and come back to it then the wine container is virtually unusable.

The rest of the system is blazingly fast. I have 16gb of ram and 4 (single threaded) CPUs on an 7th gen i7u and when the wine container freezes up, I can alt tab and run commands to investigate. CPU hovers around 30-50% and memory usage is around 3gb -- this is close to the upper limit of 4gb for a 32bit application which makes me suspicious.

I had the wine application crash with a "out of memory" error, as well, even though the rest of the system was fine.

I guess at this point I should clarify I'm running Linux (fedora) on an Asus Zenbook and I've been using docker-mtgo for about a week (happily!)

I also just sponsored you on github <3

Also, for what it's worth, I popped out the "WINEARCH win32" line from the docker-wine Dockerfile, rebuilt a local docker image tagged as "mtgo-wine", changed the "FROM" line in the top-level docker file to point to "mtgo-wine" then rebuilt this tagged as "mtgo", and changed the "image" line in run-mtgo to point to the new mtgo image

mtgo application did start. No idea if it will run better or worse, and/or if it's actually using your remote image still somehow, but I'll give it a shot anyway.

Ok, thanks for the details. It might even be that the memory leaks are from the MTGO application itself. If not, we may have hope they will get progressively fixed in wine. I'll try to see if we can debug that.

For the WINEARCH win32, it may have no effect if kept the 32bit debian base image (FROM i386/debian:stable in the docker-wine/Dockerfile). I'll prepare a branch to try the 64bit version, but there is little hope at the moment..

And many thanks for the sponsor!! I really appreciate it.

Tracked the majority of these to running in emulated desktop mode. After removing the emulated desktop environment from wine and giving the window manager control over the windows, performance is improved dramatically

Good to know! I'll probably make it the default at some point, this emulated desktop seems to solve many different issues.

For the record, related to your initial report, wine made huge progress and since 9.0-rc1 I'm able to run MTGO natively on amd64 using the panard/mtgo:wow64 image - see #176.
So I'm closing this issue for now, if you give a try to this image, you can give feedback in #176.