I do have an application server written in c# (.net 4.8) and i try to understand the memory usage. I think there is no problem with my memory (no memory leak), but i'd like to understand the behavior when using gcserver ebnabled=true in the app.config.
The following are screenshots of the memory consumption taken with ANTS.
Memory after server start (gcserver enabled=true)
Memory after login/logout 1200 times (gcserver enabled=true)
Memory after server start (gcserver enabled=false)
Memory after login/logout 1200 times (gcserver enabled=false)
My current assumption and question
When using gcserver ebnabled=true, a lot of unused memory is allocated. I assume this is for performance reasons and also because my system has plenty of memory left (At the time of those screenshots, my system used 14gb of available 32gb).
Is there some documentation about this behavior and why so much unused memory is allocated`when gcserver ebnabled=true is used?
CodePudding user response:
As indicated in this MSDN documentation on the gcserver setting, and particularly in the configuration section for GCNoAffinitize
When enabled, one of the effects of the gcserver setting is to have one heap per processor (read here : by processor core), which would explain the observed behaviour based on the hardware reported.
In our case 118Mo (Heap with gcserver disabled) * 12 cores = 1.4Go, which is matching the observed difference between the two captured states.