-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
The same asp.net core application runs on windows and linux, the workspace memory usage is doubled #72557
Comments
@dorthl thanks for contacting us. Have you tried capturing a couple of memory dumps and checking the heaps for differences? |
Transferring to dotnet/runtime since this is likely a difference at the CoreCLR level. @dorthl Can you also confirm whether this is on the same machine? Do you have the same number of cores and same amount of RAM when you're running on Linux and Windows? In general, it's not unexpected that you'd see some differences in working set and such on different OS's. |
@adityamandaleeka thank you for your reply I have tested it on multiple computers with windows and linux systems. I know that there are differences in the implementation of CoreCLR on different operating systems, but this difference is too huge in practice, resulting in the development and deployment of multiple platforms. Unpredictable The latest test result is to create the simplest asp.net core application
Use dotnet-counters monitor windwos system: windows 11 22000.795 cpu: intel i5-7500(4 cores 4 threads) Ram 16GB It has also been tested on the cloud server, and the cloud server for linux results is the same as the local linux, so I think it is a system implementation difference Or maybe it could be a difference at the CoreCLR level. The point is that the difference in memory usage is double or even more. My asp.net core is usually deployed on a linux server through docker, and usually a few or a dozen asp.net cores are deployed application, the difference is quite obvious I just feel that this huge difference needs to be explained in the documentation or blog so that in development deployment this situation is expected |
Thanks, looking forward to the release of preview7 |
If you would like you can try out the preview7 builds from here: https://github.com/dotnet/installer, to ensure the issue is indeed resolved for you. Thx! |
@mangod9 It is a pity that after updating the sdk there is no change on the linux-64 platform environment
dotnet-counters Working Set (MB) 229.765, windows 100~mb |
@mangod9 Still a simple asp.net core application
sdk: 7.0.0-preview.7.22375.6 run windows Working Set (MB) 44.306 linux Working Set (MB) 140.988 |
Hmm.. is your linux container still running with 4gb of memory available? |
Also, are you noticing any difference between preview6 and preview7 when measured on linux? |
@mangod9 If there is a difference, I see no difference, everything remains the same linux local test machine
The cloud server is only a test machine, so only 2GB of total memory is actually about 1.8GB, and the available memory is about 800MB, the result is the same The production environment has a larger memory environment, but I can't test in the production environment |
hmm, that is interesting. We have seen a drop in working set for our asp.net benchmarks. @mrsharm fyi. |
@dorthl did you close because this is resolved for you? |
@danmoseley i didn't solve it But I did a lot of tests and found that the smaller Working Set of windows is just an optimization of .net for windows |
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
Exact same asp.net core simple application
run as dotnet xxx.dll
Use dotnet-counters monitor to view Working Set (MB) windows:108.343,linux:215.679
Describe the solution you'd like
I know that this may be caused by the differences in the implementation of dotnet on different platforms, but I have not inquired about such differences and explanations in dotnet, asp.net core documents and blogs.
This has brought me a lot of trouble. The application is developed on the windows platform and then deployed on the linux platform. The difference causes that when I publish the application to the running platform, the memory usage is twice or even larger than expected. difference
Additional context
My English is not good, please forgive me
The text was updated successfully, but these errors were encountered: