Windows Support Menu
Mapcache is a performance feature that allows programs to consume less memory. Simply installing Windows 98 gives you some of the benefits of aligned binaries running directly from the cache, but to gain the most benefit from aligned binaries you should run Winalign.exe (discussed in detail on the next page). The alignment process takes less than 1 minute on an empty drive (only Windows 98 installed), and should not take longer than 5 or 6 minutes on a very full drive.
Memory Mapped I/O out of Cache
Memory can be seen as divided into 2 parts; the disk cache (VCACHE) and memory that is allocated to run programs (VMM). The cache is useful for many reasons due to the fact that memory I/O is faster than disk IO. For example, if you run Microsoft Word, close the application, and shortly afterwards launched Microsoft Word again, a lot of the application is brought into VMM to run from the cache rather than having to read from your disk. This results in a much quicker application launch.
This feature prevents EXE and DLL code pages aligned on 4K boundaries from occupying two pages in memory (one in the cache and one in the VMM). Upon a page fault from a Win32®-based application, the page is copied from disk into VCache, and then the processs VMM creates a pointer to the 4K VCache page to execute from, rather than making its own copy, as it would have in Windows95. Since the system is now executing code out of its cache, more code will stay resident there.
The downside of this process is that the cache takes up memory that could be used for other applications. You end up having 2 copies of data in physical memory; one copy in the cache and another in VMM which is being used to run the application. Having more memory available to VMM in many other cases than the application reload lets your system run faster, as it prevents over committing memory and writing/reading from the swap file, another case of slow disk I/O.
Memory Mapped I/O out of Cache attempts to get the best of both worlds. It keeps a single copy of many pages of memory in one place rather than two places. Many changes were made in the way our memory manager manages the cache, and the way the file system interacts with memory. The net effect is that you should have more memory available to run your applications, resulting in a lower amount of your swapfile that is being used.
Preliminary tests have shown that on a 16MB machine, with Microsoft Excel 97 and Microsoft Outlook 97 both loaded, your swapfile in use will be around 1.4MB smaller. This will result in a quicker system as you run multiple applications.
The system can only map sections of files that are aligned on 4K boundaries. Files are commonly compiled with 512 byte boundaries, resulting in a 1 in 8 chance that a particular page can be mapped from cache. Using the WinAlign tool described next solves this problem.
How can you tell if Mapcache is working?
Start System Monitor then click Edit, Add Item, Memory Manager, Pages Mapped from Cache. Multiply the number Sysmon reports by 4 KB and this should give you a figure that will tell you how much memory youve saved.
For example, if System Monitor reports a number of 1.8k, multiply this by 1,024 then by 4,096 (1.8*1024*4096=7,549,747 bytes): this is roughly 7.2mb of memory saved by running directly from the cache. Load up "Swapfile in use" into Sysmon and youll notice that your system should be working less from the Swapfile than before, which should equate to better performance the hard drive is one of the slowest components in a system, which is where your Swapfile resides.