Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mono create temporary files when WINE run an executable ? #143

Open
Augusto7743 opened this issue Jun 5, 2022 · 9 comments
Open

Mono create temporary files when WINE run an executable ? #143

Augusto7743 opened this issue Jun 5, 2022 · 9 comments

Comments

@Augusto7743
Copy link

Hello.
Thanks for read my topic.
Using WINE 7.7 Mono 7.2 in Ubuntu 20.04.4.

Have an disk activity only happening when running exe requiring net framework.
Trying run 2 softwares (Romcenter and Duplicate Cleaner) both using net framework 4 works very well, but have an high written activity in disk.
Both softwares even not saving any file in disk in less of 1 hour is done more of 200 MB written in disk being that written temporary because the disk free space continue being the same size.
One time the written activity was above of 3 GB in less of 4 hours even not saving any file in disk.
Both softwares not use any temporary folder and not use any system own folder for temporary activity.

WINE or Mono use an temporary folder and create files to run net framework executables ?
If yes where is that folder ?
An solution is create an folder in tmpfs and create an symbolic link.

Thanks for making Mono.
Have an nice week.

@HinTak
Copy link

HinTak commented Aug 2, 2022

You did not include any details. Anyway, wine and wine-mono, on first use, writes about 600MB to a create a 32-bit WINEPREFIX. About double that for wow64, 1100MB, the default these days. This is done once, when you use it the first time.

It also depends on whether your linux box uses swap. That is disk activity too, and if your software is memory hungry, certainly generates a lot of disk activity too.

@Augusto7743
Copy link
Author

Not swap file. Using zram.
Each time an net framework run using WINE is done written actitivity even not saving any data.
Is as if is done an temporary written to run an net framework program.

@HinTak
Copy link

HinTak commented Aug 2, 2022

Mono (just like dotnet framework) also have a gac and can use ahead of time compilation for performance. For example, I am running dotnet 2 in wine (not mono) in a fresh WINPREFIX - it was under 800MB first created a few days ago, now it is 950MB. Most of the increase in the GAC and the native image (ahead of time cache).

@Augusto7743
Copy link
Author

Thanks for replying with that information.
GAC is required to run net framework executables ? If not is possible disable ?
Is possible disable "ahead of time cache" or change the path where are written files for that feature ?

@HinTak
Copy link

HinTak commented Aug 2, 2022

Those are big topics... you should read about them, at the official places such as:

https://www.mono-project.com/docs/advanced/aot/

https://www.mono-project.com/docs/advanced/assemblies-and-the-gac/

And also the windows dotnet ones, which mono tries to immitate:

https://docs.microsoft.com/en-us/dotnet/framework/app-domains/how-to-remove-an-assembly-from-the-gac

@madewokherd
Copy link
Owner

Pretty sure AOT doesn't work in Wine Mono, so it wouldn't be that.

@HinTak
Copy link

HinTak commented Aug 2, 2022

If you are interested in wine-mono's disk activity on your SSD for tear and wear, for example, you can relocate the whole wineprefix by setting WINEPREFIX to a removable USB. This way you can separate disk activity to wineprefix (gac etc) from those generated by yout software which mono runs.

I don know about Romcenter, but Duplicate Cleaner sounds like it would generate disk activities, building indices of files it scans, for example.

@Augusto7743
Copy link
Author

If Mono not support "ahead of time cache" is doing written in another path.
Duplicate Cleaner only scan paths to compare file hash to remove. Only does written in disk to remove, move or copy and file, but the high written in disk is when Duplicate Cleaner is scanning.
Using Mono to running others net framework softwares also does written in disk, but possibly is an temporary file written because using Duplicate Cleaner for an session only removing files is done 1 GB disk written and the disk space used continue the same space in disk partition used in wineprefix.
That's an temporary file written to run net frameworks softwares.
I need figure which are the paths used and redirect using symbolic links to /tmp (using tmpfs).
I will try figure it.

@HinTak
Copy link

HinTak commented Aug 7, 2022

Mono respects the usual general windows mechanisms for redirecting tmp file usage: setting the TEMP variable to someplace else. And if you really want the details, you can also use the usual general linux mechanisms of logging every glibc file open/write operations, via setting LD_DEBUG, for example (https://man7.org/linux/man-pages/man8/ld.so.8.html).

Honestly though, your question and problems have very little to do with wine or mono or wine-mono at this point... you really should seek general advice about tracing and profiling file system operations, in general, under windows and also Linux, at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants