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

Massive disk usage when running on .NET Core / Ubuntu #70

Closed
jamesmeneghello opened this issue May 1, 2018 · 9 comments
Closed

Massive disk usage when running on .NET Core / Ubuntu #70

jamesmeneghello opened this issue May 1, 2018 · 9 comments

Comments

@jamesmeneghello
Copy link

One of our build runners is Ubuntu-based currently, building a reasonably large project (~15 projects in a single solution). Using dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover, I'm seeing some files created in /tmp that are fairly enormous (naming scheme <project>_<hash>) - one of the files covering our largest project is nearly 90gb - about 180gb for all projects combined. Disabling coverlet, the files don't get created at all, so I'm assuming they're cache files of some kind.

Should they be this big? Our build runner doesn't have that much disk space allocated, so it keeps bringing it down :|

@hunterjm
Copy link
Contributor

hunterjm commented May 1, 2018

@Murodese - That would be the hits file. It adds a new line for every sequence point hit, soon to be branch targets as well. Those must be some massive projects. The hits file for this project is 133MB on my machine, and that's on my branch which adds additional instrumentation for better branch coverage. So 15 of them would be ~2GB in total.

@tonerdo - It might be worthwhile looking into reading and writing from a GZipStream. The markers should compress pretty well.

@tonerdo
Copy link
Collaborator

tonerdo commented May 1, 2018

@hunterjm @Murodese this has already been fixed in #58. New NuGet package with the fix going out in a couple of hours

@tonerdo
Copy link
Collaborator

tonerdo commented May 1, 2018

On closer look, this looks like more of a disk usage thing than a RAM usage thing. Definitely need to consider your approach @hunterjm

@jamesmeneghello
Copy link
Author

Yeah, RAM usage is fine, it's just literally filling up our disk.

@OneCyrus
Copy link
Contributor

OneCyrus commented May 1, 2018

yes, the memory problem comes later. but should be fixed in the next release. otherwise you would need 90-180GB memory as well to process this file.

the GZipStream could be a good option to solve this problem. shouldn't be too hard to implement.

@hunterjm
Copy link
Contributor

hunterjm commented May 1, 2018

@tonerdo @OneCyrus @Murodese - Initial take on using GZipStream is on my fork. If I merge hunterjm#1, it will become a part of #69. Otherwise, I can wait for #69 to be merged and re-target hunterjm#1 to master.

@tonerdo
Copy link
Collaborator

tonerdo commented May 1, 2018

@hunterjm thanks for the fix, will take a look in a bit. Let's get #69 in first and then we can proceed with the branch fixes. There's also no harm in opening up a separate PR to this repo

@hunterjm
Copy link
Contributor

hunterjm commented May 1, 2018

@tonerdo - Agreed. I just made the changes locally off of the #69 branch, and since the fix touches Coverage.cs there would be merge conflicts if I tried to pull it out and open a separate PR to master.

@tonerdo
Copy link
Collaborator

tonerdo commented May 17, 2018

New release with disk usage fix - https://www.nuget.org/packages/coverlet.msbuild/2.0.0

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

4 participants