Re: Memory Management Tools
- From: Helge Klein <Helge.Klein@xxxxxxxxxxxxxx>
- Date: Fri, 01 Jun 2007 19:45:59 -0000
some too. Be careful though many 'memory management' products are
really virtual memory management.
Jeff is only too right on this.
One area where real optimization actually is possible is DLL rebasing.
It is relatively simple to explain: Multiple processes can and do
share DLLs. DLL sharing is implemented by mapping the pages of
physical memory into the virtual memory of each application. But what
happens if one process needs to write to a DLL? Obviously it is not
viable to modify the DLL for all processes. Instead Windows uses a
rather neat technique called copy-on-write: only the memory pages
written to are copied in the memory of the process making the
modification. This causes the corresponding pages to be present in RAM
twice.
So when is a DLL being written to? Should it not be static?
Well, the Windows loader, which loads the DLL into memory (which in
fact is rather a mapping than a loading operation) tries to load each
DLL at its base address, which is hard-coded into the DLL and set at
compile-time. If the memory at a DLLs base address is already occupied
by another DLL, the loader has to rebase the DLL. That means changing
a lot of addresses throughout the DLL, aka writing to the DLL memory.
That is when Windows does its copy-on-write trick which leads to
higher memory usage especially on terminal servers, where multiple
users use the same apps with the same DLLs.
What can you do?
There are products that minimize DLL rebasing by optimizing DLL base
addresses. One I personally know is RTO TScale:
http://www.rtosoft.com/Products/TScale/TScale.htm
It is built into Citrix Presentation Server 4+, but can be bought from
RTO, too.
Douglas Brown has published an excellent podcast with RTOs Kevin
Goodman, who explains much about the whole process:
http://www.dabcc.com/podcastdetail.aspx?id=2
If you want to take another route: consider moving to Windows x64 with
more RAM instead of buying software. Might even be cheaper ;-)
I hope this helps.
Helge
.
- Follow-Ups:
- Re: Memory Management Tools
- From: Bob
- Re: Memory Management Tools
- References:
- Re: Memory Management Tools
- From: Jeff Pitsch
- Re: Memory Management Tools
- Prev by Date: Re: thin client com ports
- Next by Date: Re: Memory Management Tools
- Previous by thread: Re: Memory Management Tools
- Next by thread: Re: Memory Management Tools
- Index(es):
Relevant Pages
|