.NET JIT assemblies in shared pages

When I run the .NET 2.0 WinForms application in the Terminal Services environment, I see some unexpected results that I cannot explain. Everything I read indicates that JIT assemblies (i.e., not using NGen to create their own images) lead to everything that code space is stored on closed pages, increasing the size of the working set / memory pressure. However, actual results (verified using Process Explorer, VMMap, and WinDbg) show that even JIT assemblies are indeed hosted on shared pages (and are actually shared when there are multiple instances of the application, even under separate TS sessions / users) .

Can someone explain why this could be? This is done in the W2K8 server environment, so ASLR explains why the lack of specific base addresses for each assembly and the resulting reboot does not cause problems. However, it seems that these are not native PE images, should lead to the fact that the code for these assemblies is stored on closed pages.

This was discovered when we started exploring the use of NGen to reduce memory pressure, but actually found that it increased the size of the working set - since the JIT assemblies were already split.

The most recent link I found is here, which again differs from our actual results:

http://blogs.msdn.com/morgan/archive/2009/03/07/developing-net-applications-for-deployment-on-terminal-services-or-citrix.aspx

Change: . I must add that since the first publication of the question, additional experiments in the Windows Server 2003 test windows also seem to demonstrate the joint assembly of JITs between processes. I'm still at a dead end why all the tips I can find indicate that NGen is required, but all the real data contradicts this. I really hope that the experts here can shed light.

Thanks!

Edit: I have cleared all my .NET / CLR books, and I don't have enough ideas for search queries to try to solve this problem; who is going to make my day, helping to eliminate this terrible smelling feeling: "I do not understand what is happening"!?! :)

+3
1

, . JIT-, DLL - , . , , - IL, .

, 30K . JIT- 8,2 , NGEN - 3,8.

NGEN . NGEN, , . JIT 2,3 . NGEN 32 .

NGEN . , ( ) .

+4

Source: https://habr.com/ru/post/1705939/


All Articles