Fysiek en Virtueel geheugen in Windows 10


Hoe werkt het fysiek en virtueel geheugen in Windows 10

Een Nederlandse vertaling van het artikel van Sushovon Sinha vind je op onze stack hier.

Als slotconclusie is deze niet onbelangrijk als je van plan bent iets anders aan te schaffen:

RAM ontwikkelde zich als buffer tussen de lage snelheid HDD en de high speed processor. RAM kan in de toekomst vervangen worden als de snelheid van de harde schijf of SSD, de snelheid van de RAM kan bereiken. Momenteel is de opslagtechnologie geavanceerd naar Solid State Drives (SSD) en SD-kaarten die aanzienlijke snelheid, robuustheid en voor mobiele apparaten ook miniaturisatie vereisen die nodig zijn . Maar deze SSD-drives kunnen de RAM niet effectief vervangen vanwege hun beperkte schrijfcyclus-duurzaamheid, die de uiteindelijke levensduur bepaalt. Ten einde de levensduur tot een minimum van 5 jaar te verbeteren heeft een SSD een ingebouwde controller die de schrijfcycli gelijkmatig verdeelt over al zijn bruikbare ruimte. Als een SSD wordt toegepast om als RAM te simuleren, zal deze strategie zal echter het leven van SSD’s niet verlengen, omdat de schrijfcycli overweldigend groot zijn in RAM. Immers objecten zoals webpagina’s, apps en data worden de hele tijd gemaakt of bewerkt. In feite moet het RAM als buffer fungeren voor alle objecten die worden opgeslagen van opslaglocaties, ofwel in web / netwerk / lokale opslag.

Er is nog een andere mogelijkheid dat RAM uiteindelijk wordt samengevoegd met de cache van de processor, wanneer de technologie voldoende geavanceerd is voor het produceren (met verdere miniaturisering) van lage energie-verbruikende geheugenchips, die haalbaar zijn om de verzadigingsgrootte in het systeemontwerp te bereiken. In het huidige systeem blijft het doel van het uitvoeren van processen nog steeds verschillend van het doel van de harde schijf, namelijk om gegevens op te slaan en opgeslagen procesbestanden naar geheugen te sturen.

De uitzondering is de page file (aanwezig op de HDD of SSD) en fungeert als een secundaire cache wanneer de geheugenbehoefte van processen hoger is dan het geïnstalleerde fysieke geheugen. Vanwege de trage responstijd van een harde schijf in relatie tot geheugensnelheid is het paginabestand nooit een echte vervanging voor RAM en wordt alleen toegepast als een noodmaatregel om geheugenruimte vrij te maken. Het vergroten van de grootte van het page file verbetert de prestaties van het systeem niet.

Met name deze beschouwing is reden om een maximale grootte van RAM toe te passen en zo mogelijk een SSD niet te gebruiken als page file. Je kan dit dus het beste aan Windows 10 overlaten.

De 4 GB geheugengrens en 2 TB opslagruimte limiet in 32-bits systemen, maakt een enorme sprong in 64-bits systemen.  De maximale capaciteit van RAM en harde schijf, die momenteel ondersteund kan worden in een high-end systeem, is vele malen groter. Zo maken 64-bits systemen alle toekomstige technologische ontwikkelingen in de komende decennia mogelijk.

How to measure VAS with FSUIPC


measuring-vas-fsuipc2.pngYou can measure the status of the VAS using FSUIPC and place the measurement on screen.

If you don’t know what VAS is, please read first this post :: How Memory is Managed by the OS.
Further you can read all about Memory issues in this category.

With FSUIPC you can measure the Available FS memory (as it is called in the FSUIPC Offset Status.pdf). With the offset code 024C with Type S32 you measure the Available Virtual Address Space in kilobytes. This value is updated every 10 seconds.

The Available VAS + the Virtual Size of the process Prepar3D.exe equals ± 4GB as being the total VAS space for each 32 bits process. With other words: the  4GB VAS space minus the virtual size of the process Prepar3D.exe equals the remaining available virtual address space. When this VAS space is consumed…you get an OOM error message.vas-maxed-out2.png

How to show Available VAS on screen.

  1. In Prepar3D open Add-ons – FSUIPC and select tab Logging.
  2. Check: IPC reads  in Log Details and FS Window (or FS Title Bar) in Display to
  3. Fill Offset = 024C and Type =32 in the Specific value checks
  4. Close with OK
  5. You can drag and resize the green FS Window bar as desired to any convenient place on the screen. Once configured in FSUIPC it will appear again at next start.

measuring-vas-fsuipc.pngYou could also place the information in the FS Title Bar for a better reading result.

The value in the Title bar is read as 2643028 x KB=2.643 MB …as we speak of 2.6 GB.vas-maxed out3.PNG

How could you reach an OOM situation on startup?


vas-maxed-out1.png

In the image above you see the development of a coming OOM:: Out of Memory situation of the virtual address space. When a value of 4096 MB  (4GB) is reached, you get this message:vas-maxed-out2.png

How could you reach an OOM situation on startup?

start-scenario.pngThere are 2 possibilities for start after you have activated prepar3d.exe. Either the previous flight starts or the Prepar3D® Training Scenario Setup screen is activated.

When scrolling through the list of airplanes, textures are loaded. The texture map pages textures out if they have not been used in 10 seconds.  

Unfortunately, the timer used to age texture has not been initialized yet when the scenario start-up screen loads.  

The textures for the aircraft you looked at, but didn’t pick, will stay loaded until roughly 10 seconds after the simulation finishes loading.  This makes it much easier to run out of memory on startup.  

If you go to the vehicle select screen, after the sim is loaded up, the textures should page out ok while in the preview screen.  You can still have issues if you scroll too fast though because of the 10 second limit.  

For the next release, Update 2.5,  textures will page out in both versions of the vehicle select screen and the textures will page our much more quickly.

Issue is soved in V2.5

Source: Prepar3D®


How to prevent?

Select_vehicle-01.pngAt startup of the sim with the Prepar3D® Training Scenario Setup screen the virtual space is used for approx. 0.8 GB.

When scrolling through the list of airplanes with its different textures, each airplane will consume an amount of VAS.

At the moment you reach the 4GB limit you get the OOM error message.

If you won’t run the risk of OOM at startup, you could reduce the number of airplanes in the folder ../Simobjects/Airplanes, so you have little to choose (little to scroll) OR you start the sim with the Previous Flight which automatically runs at startup.

If you want to change the aircraft then, just go to Vehicles select screen and select the vehicle. You could also reduce the risk when you make a list of your Favorites. (Hit the asterix on the line of your choice and check the asterix “Show Only Favorites”).

According to Prepar3D® this should be improved in the next release.

If you want to watch the development of your VAS with FSUIPC click HERE to read how you can view on screen.

Monitoring RAM and virtual memory usage


perfmonitor-2Performance Monitor is the principle tool for monitoring system performance and for identifying the location of the bottleneck. To start Performance Monitor, click Start, click Control Panel, click Administrative Tools, and then double-click Performance Monitor. Here is a summary of some important counters and what they tell you:

  • Memory, Committed Bytes:
    This counter is a measure of the demand for virtual memory.
    This shows how many bytes were allocated by processes and to which the operating system has committed a RAM page frame or a page slot in the pagefile (or perhaps both). As Committed Bytes grows greater than the available RAM, paging will increase, and the pagefile size that is being used will also increase. At some point, paging activity starts to significantly affect performance.
  • Process, Working Set, _Total:
    This counter is a measure of the virtual memory in “active” use.
    This counter shows how much RAM is required so that the virtual memory being used for all processes is in RAM. This value is always a multiple of 4,096, which is the page size that is used in Windows. As demand for virtual memory increases beyond the available RAM, the operating system adjusts how much of a process’s virtual memory is in its Working Set to optimize available RAM usage and minimize paging.
  • Paging File, %pagefile in use:
    This counter is a measure of how much of the pagefile is actually being used.
    Use this counter to determine whether the pagefile is an appropriate size. If this counter reaches 100, the pagefile is full, and things will stop working. Depending on the volatility of your workload, you probably want the pagefile large enough so that it is generally no more than 50-075 percent used. If much of the pagefile is being used, having more than one on different physical disks, may improve performance.
  • Memory, Pages/Sec:
    This counter is one of the most misunderstood measures.
    A high value for this counter does not necessarily imply that your performance bottleneck stems from a shortage of RAM. The operating system uses the paging system for purposes other than swapping pages because of memory over-commitment.
  • Memory, Pages Output/Sec:
    This counter shows how many virtual memory pages were written to the pagefile to free RAM page frames for other purposes each second.
    This is the best counter to monitor if you suspect that paging is your performance bottleneck. Even if Committed Bytes is greater than the installed RAM, if Pages Output/sec is low or zero most of the time, there is no significant performance problem from insufficient RAM.
  • Memory, Cache Bytes,
    Memory, Pool Nonpaged Bytes,
    Memory, Pool Paged Bytes,
    Memory, System Code Total Bytes,
    Memory, System Driver Total Bytes:
    The sum of these counters is a measure of how much of the 2 GB of the shared part of the 4-GB virtual address space is actually being used. Use these to determine whether your system is reaching one of the architectural limits.
  • Memory, Available MBytes:
    This counter measures how much RAM is available to satisfy demands for virtual memory (either new allocations, or for restoring a page from the pagefile).
    When RAM is in short supply (for example, Committed Bytes is greater than installed RAM), the operating system will try to keep a certain fraction of installed RAM available for immediate use by copying virtual memory pages that are not in active use to the pagefile. Therefore, this counter will not reach zero and is not necessarily a good indication of whether your system is short of RAM.

Source: Microsoft

4GB Patch for FSX.EXE


Lets’ start with current available information from MSDN:
On 32-bit editions of Windows, applications have 4 gigabyte (GB) of virtual address space available. The virtual address space is divided so that 2 GB is available to the application and the other 2 GB is available only to the system.
The 4-gigabyte tuning (4GT) feature, formerly called 4GT RAM Tuning, increases the virtual address space that is available to the application up to 3 GB, and reduces the amount available to the system to between 1 and 2 GB.
For applications that are memory-intensive, such as our FSX app, the use of a larger virtual address space can provide considerable performance and scalability benefits.

However, the file cache, paged pool, and nonpaged pool are smaller, which can adversely affect applications with heavy networking or I/O. Therefore, you might want to test your application under load, and examine the performance counters to determine whether your application benefits from the larger address space.
To enable 4GT, use the BCDEdit /set command to set the increaseuserva boot entry option to a value between 2048 (2 GB) and 3072 (3 GB).
The /3GB switch is supported on 32-bit editions like Windows XP Professional, VISTA, W7X32.

The /3GB switch makes a full 3 GB of virtual address space available to applications and reduces the amount available to the system to 1 GB. On Windows Server 2003, the amount of address space available to applications can be adjusted by setting the /USERVA switch in Boot.ini to a value between 2048 and 3072, which increases the amount of address space available to the system. This can help maintain overall system performance when the application requires more than 2 GB but less than 3 GB of address space.

To enable an application to use the larger address space, set the IMAGE_FILE_LARGE_ADDRESS_AWARE flag in the image header. The linker included with Microsoft Visual C++ supports the /LARGEADDRESSAWARE switch to set this flag. Setting this flag and then running the application on a system that does not have 4GT support should not affect the application.

On 64-bit editions of Windows, 32-bit applications marked with the IMAGE_FILE_LARGE_ADDRESS_AWARE flag have 4 GB of address space available.

fsx_exe_4GB.PNGThis very little tool patches our x86 executable fsx.exe in order to let it have 4GB (instead of only 2GB) of virtual memory on x64 platforms. To gain these 2GB, you just have to use this tool to patch the executable (*.exe file) of the software you want to have these additional GB’s of virtual memory.

You can download the tool from this website.
It can be used by clicking on it and choosing the file or through command line (e.g.: “4gb_patch file.exe”).
It automatically creates a backup copy of the original executable.

A modified fsx.exe (SP2) is available upon request via our download page.

Resources: MSDN, NTCORE.com

Address Space Monitor


Address Space Monitor is a simple utility to monitor a process’ use of its address space.  To begin monitoring a process, choose the “Process|Attach …” menu option and type in the process id of the process to be monitored. The “Attach to process” dialog box now features a process browser so that you can select the process by name.

Alternatively you can choose to spawn a new process. If you select the “Process|Run…” menu option you will be presented with the “Run” dialog box. From here you can browse for the executable file for the process you wish to start and the initial working directory for the process. You can also enter in any required command line arguments.

While monitoring a process, the display is split into three sections.

The top section shows the address space of the process in a gauge format, from low addresses (close to zero) on the left, rotating clockwise to high addresses (2GB for 32-bit processes, 8TB for 64-bit processes) on the right.

Free address space is shown in green, reserved addresses in yellow and used (committed) memory regions in red.

The next section of the display shows the largest free regions of address space as colored ellipses in descending order of size. The full width of the display represents a quarter of the total address space for the process (about 512MB for 32-bit processes, about 2TB for 64-bit processes) and large regions are shown as half an ellipse covering the full width of the display even if they exceed half the total address space.

The regions are colored according to their upper address so that they can be tracked as their lower parts are used up. Low regions start from yellow, going through magenta at half way, to cyan at the upper end of the address space.

The final section has some textual summaries for the address space.

The first number is the total amount of committed address space for the whole process,  the second number is the total amount of reserved address space for the process, the third number is the total amount of free memory and the final number is the size of the largest free address space region.

For committed and reserved regions these totals may be larger than what you might expect from looking at other memory analysis tools as all address space is counted, including mapped files and shared memory regions, rather than just regions which are mapped to physical memory or swap file space.

The utility has most use for 32-bit processes as 64-bit process tend to be dominated by a very large (only fractionally smaller that 8TB) region of free address space from the 2GB boundary upwards.

Address Space Monitor now supports recording both single snapshots of a process’ address space as well as recordings of a process’ address space over time. A snapshot can be recorded through the “File|Save as…” menu options, and redisplayed through the “File|Open…” option.

A recording can either be started through the “File|Record…” option or, when creating a new process, by selecting the “Record” check box in the “Run” dialog box and browsing for the name of a file to record. In both cases the recording will stop when the process being monitored exits. While recording the “File|Record…” menu option will display a tick icon. The recording can be halted manually by reselecting the “File|Record…” menu option while the menu option displays a tick mark.

The utility can be downloaded from HERE

Source: Charles Bailey.

Virtual Address Space


Menigeen raakt in verwarring als het gaat om de wijze waarop een operating systeem omgaat met het geheugen en de gevolgen die zichtbaar zijn wanneer er te weinig geheugenruimte wordt gesignaleerd. In dit artikel een uitleg over hoe een en ander in zijn werk gaat.

In de pc heb je te maken met twee soorten geheugens. Fysiek geheugen en virtueel geheugen.

Fysiek geheugen komt in verschillende vormen: on-chip cache, off-chip cache en systeem geheugen. Het Operating Systeem (OS) ziet deze als cache geheugen. Ook het bestand pagefile.sys is een soort cache geheugen, en dit bestand verblijft op de harddisk.
Het werkgeheugen (RAM) wordt geadresseerd met hex adressen en bij een 4 GB geheugen loopt dit van adres 0x0000 0000 tot 0xFFFF FFFF (0 tot 2^32 -1)
In principe is bij een 32-bits operating system de fysieke geheugenruimte ingedeeld in twee gedeeltes van 2 GB, waarbij dus de helft is gereserveerd voor het operating system (kernel, dll, user, etc) en de andere 2 GB voor het verwerken van gebruikersbestanden. Het werkgeheugen (RAM) krijgt zijn informatie aangeleverd door de informatie uit het virtuele geheugen.

Virtueel geheugen.
Wanneer de computer opstart, ontstaan er processen. Ieder proces heeft een nummer -een proces-ID- en krijgt een 4 GB virtuele adresseringsruimte toebedeeld (en dat is dus geen geheugenruimte!) met een adres-hex-waarde van 0x00000000 tot 0xFFFFFFFF minus 1.

Deze adressen tezamen worden ‘virtual address space’ (VAS) genoemd. Kortom maximaal 4.194.303 geheugenplaatsen met de waarde nul of een. De waarde die een geheugenplaats krijgt, wordt verkregen uit de waarde zoals die in een bestand aanwezig is. Iedere keer als er een nieuw proces wordt gestart, krijgt het proces-ID een nieuwe VAS toebedeeld die 4 GB groot is. Een proces dat wordt gestart met een bestandsgrootte van 32 kb neemt dus in principe 32000 verschillende adresposities in beslag met ieder een eigen waarde. Nogmaals: 4 GB virtuele adressen is niet gelijk aan de mogelijk aanwezige 4 GB werkgeheugen.

Voorbeeld:
Wanneer er een applicatie op een 32-bit Os wordt gestart, krijgt het proces een 4 GB VAS. De waarde van de bytes in de VAS is per definitie geen, anders ontstaat er een “memory exception”.

VAS.
0 |-----------------------------------------------------------------------------| 4 GB

Daarna wordt de de applicatie.exe gemapped in de VAS

0 |---------------vvvvvvvvvv----------------------------------------------------| 4 GB

De adressen van het proces worden door het OS gehaald uit het exe-bestand en de v-tjes vertegenwoordigen de waarde zoals het bestand aangeeft (0 of 1)
Dan volgen de gewenste DLL bestanden en systeembestanden zoals kernel32.dll en user32.dll

0 |--------------------vvvvvvv------vvvvv-----vvvvvvvv---------------------------| 4GB
VAS MAPPING FILE BYTES |||||||      |||||     ||||||||
0 |--------------------app1.exe-----kernel-----user.dll--------------------------| 4GB

Het proces begint dan met met uitvoeren van de bytes uit het bestand. Echter de enige manier om om de waarde van de VAS te wijzigen, is er een waarbij het OS de waarde van de byte uit een file overbrengt in de VAS. Een gebruikelijke manier om de VAS te voorzien van waarden is de waardes te mappen met die uit de pagefile.sys. De pagefile is een enkelvoudig bestand, maar met meervoudige sets van aaneengesloten bytes die kunnen worden gemapped met de VAS. Daarbij kunnen verschillende delen van de pagefile gemapped worden met VAS waarden van verschillende processen.

0 |-------VVVVV----------------------vvvvv-----vvvvvvvv--------VV---VV----VVV-----| 4GB
           ||||                      |||||     |||||||         ||   ||    |||
0 |--------APP1.EXE----app2.exe-----kernel-----user.dll--------SYSEM PAGE FILE----| 4GB
VAS MAPPING FILE BYTES  |||||||     ||||      ||||||||           |          |
0 |--------------------vvvvvvv------vvvvv-----vvvvvvvv-----------V----------V-----| 4GB

Bij een 32-bit Windows installatie is er ten principale slechts 2 GB VAS ter beschikking voor processen voor eigen gebruik en de andere 2 GB worden gebruikt door het operating system.

Bij een 64-bit windows installatie en wanneer er een 32-bits executable gelinked is aan de optie /LARGEADDRESSAWARE:YES dan alleen heeft deze executable toegang tot het gebruik maken van de 4 GB adresruimte van de VAS.
Daarom staat er in de fsx.cfg een optie: HIGHMEM=1
Zonder deze optie is de adressering beperkt tot 2 GB (0x 0000 0000 tot 0x 7FFFF FFF)

Bij 64-bit processen en met de /LARGEADDRESSAWARE:YES optie op YES heeft de executable toegang tot 8 TB adresruimte; wanneer de /LARGEADDRESSAWARE:NO is ingesteld (en dat is default), dan is de adresseringsruimte beperkt tot 2 GB.

De wijze waarop de inhoud van de VAS overgebracht wordt naar het werkgeheugen noemen we “paging”. Dit is het ‘instrument’ dat er voor zorgt dat niet gebruikte bytes uit het werkgeheugen worden verplaatst naar de page file. De page table houdt bij welke adres (met zijn waarde) geplaatst moet worden op een nader te bepalen hex adres in het werkgeheugen.

Zie de VAS als een grote schoenendoos voor te ontvangen post met voor iedere afzender (proces) de mogelijkheid om 4 miljoen verschillende adressen te kennen. De tweede afzender krijgt dezelfde faciliteit. Enzovoorts. De processor haalt uit de VAS de post op die hij nodig heeft en de locatie waar de post verblijft (of in het werkgeheugen of in een offline cache of in een pagefile.sys) , staat genoteerd in het postboek (page table).

 

How Memory is Managed by the OS


How memory is managed by the OS

Your memory must support both the operating system’s (kernel) processes and user (private) processes. These steps happen when a you start a program.

  1. The operating system creates an address space for the program to run in, which involves setting up appropriate page tables.
  2. The program’s text and data segments are mapped from the executable file on disk to the virtual address space; the text being mapped as read only, the data being mapped as read-write.
  3. The stack and heap are initialized. (Whatever it means..forget it for this moment)
  4. Control is transferred to the program.
  5. The processor tries to access the first instruction. Since it is not in memory, a page fault is generated.
    This causes the operating system to intervene and allocate one or more pages of physical memory and to copy the code from the file. There you get the name: “Demand Paged Virtual Memory.”
  6. The processor then returns control to the program, which continues executing until it encounters another page fault. At this point, step 5 is repeated.
  7. If there is no free physical memory, the operating system will have to
    1. either discard (if read only) or
    2. swap out (write data to swap file if read write) pages before they can be reused.
  8. Typically a least recently used (LRU) algorithm is used for deciding which pages get tossed.
  9. This pattern continues for the life of the program.

When you executes a program, the operating system creates an address space for it to run in. This address space will include the instructions for the program itself, as well as any data it requires.

In a system with memory protection, each process is restricted by the operating system to access only the memory in its own address space. However, the combined program memory requirements often exceed the system’s amount of physical memory installed on a computer. Therefore your operating system uses a portion of the hard disk called a swap file to extend the amount of available memory. This technique, called virtual memory, treats physical memory as a cache of the most recently used data.

In a virtual memory system, memory is divided into units called pages. A page is typically 4-8 KB in size. The set of addresses that identify locations in virtual memory is called the virtual address space (VAS). Each process is allocated a virtual address space. The virtual address space can range from zero to 4 GB on a 32-bit architecture.

A process’s address space contains the set of instructions and data that is mapped into virtual memory when a program is executed. Virtual memory addresses are translated into physical memory addresses through the use of a look-up table, called a page table. In addition to mapping the entire process into virtual memory, a subset of pages is also mapped into physical memory. As each instruction in the process executes, it is either found in physical memory or is not found (called a page fault).

When a page fault occurs, the page that is needed must be moved from the hard disk into physical memory before the instruction can be executed. To make room for the new page, the operating system may need to decide which page to move out of physical memory. This is called swapping. A page fault is time consuming because retrieving data from the hard disk is much slower than obtaining it directly from the physical memory. Operating systems attempt to minimize the number of page faults by swapping multiple pages at once. This becomes a trade-off between operating system overhead and the time saved by minimizing page faults, which is affected by the size of each process’s working set.

The operating system takes care of swapping and translating from virtual address space to physical address space. With a virtual memory scheme, the amount of memory available is seemingly limited only by the amount of hard drive space. Virtual memory has more memory available than physical memory because it removes the restriction that an entire process must be loaded into memory at one time.

Now read (if you did not already) the post about OOM Errors

Why Do I Get Out-of-Memory Errors


Virtual memory refers to the ability of your computer to use your hard drive as if it were the random access memory (RAM) of your computer. This ability is present on all operating systems. Thus, if you have a lot of hard drive space, it might appear that memory is almost unlimited. So why do you get still unpredictable out of memory (OOM) errors?

One cause of OOM errors is that your system has run out of space to hold all of your variables. This means that there is no unallocated virtual address space enough on your computer for programs used by e.g. FSX or P3D and therefore no new variables can be created.

Secondly OOM errors are caused by memory fragmentation. This means that there is memory available, but there is no contiguous piece of memory that is large enough to hold specified variables. When virtual memory is used and freed during normal operation of programs, memory becomes fragmented. This means that the amount of total free memory is greater than or equal to the amount of contiguous free memory. Since variables must be stored in a contiguous block of virtual memory, the largest space, which can be created at a any point in time, is limited by the amount of contiguous free virtual address space.

32-Bit Architecture
For PC’s with 32-bit architectures, the size of a processor instruction (a pointer) can be max. 32 bits long. This limitation implies that the memory addresses can be a maximum of 32 bits long, which results in a maximum of 2^32 possible memory addresses. This translates into 4 gigabytes (GB) of addressable memory. Therefore in a 32-bit architecture, the seemingly unlimited virtual memory space is actually limited to approximately 4 GB. The Windows 32-bit operating system reduces the theoretical limit down to 2 GB of virtual memory due to a design decision to reserve the upper 2 GB of address space. On some versions of Windows, this limit can be moved to allow for an extra 1 GB of memory using the /3GB switch.

64-Bit Architecture
If you are using a 64-bit operating system in conjunction with a 64-bit version of a program, (and FSX nor P3D is not) it is in theory possible to access about 2^64 bytes of memory. This means that the amount of memory that is available to programs, will be limited by the amount of memory available on the computer. As this is typically related to the amount of available virtual memory or page file size, you may want to read here how to manage the virtual memory size.

How to configure the pagefile.

For Windows 7/8

  • Right-click on Computer
  • Select Properties.
  • Select the Advanced System Settings
  • Click on the Advanced tab and then Settings under Performance.
  • In Performance Options click on the Advanced tab
  • and then click on Change under Virtual Memory.

Under Automatically Manage Paging File Size, click on Custom Size to enter the amount of swap space in MB and follow the recommendations in this screen.

Better is to set the checkbox @ Automatically manage paging file size for all drives

Unstable system – Error Resolution


Process Explorer
One of the best tools to find out what’s happening in your system is Process Explorer.
Once installed, it opens a dialog box that shows global system performance metrics like those shown in Task Manager. The information includes the amount of committed and available virtual and physical memory as well as paged and non-paged kernel buffer usage.

Graphs show the CPU usage history of the system as well as the committed virtual memory usage, and on Windows 2000 or higher systems an I/O graph shows I/O throughput history.

Red in the CPU usage graph indicates CPU usage in kernel-mode whereas green is the sum of kernel-mode and user-mode execution.

When committed virtual memory, which Task Manager labels in its graphs on Windows 2000 and higher as “PF Usage” and on NT 4 as “Mem Usage”, reaches the system Commit Limit, applications and the system become unstable.

The Commit Limit is the sum of most of physical memory and the sizes of any paging files. In the I/O graph the blue line indicates total I/O traffic, which is the sum of all process I/O reads and writes, between refreshes and the pink line shows write traffic.

Error resolution

  1. So, whenever you expect FSX to hang, to stop or to restart….let this Process Explorer run in background.
  2. Have a look if your system is in balance with the Commit Charge values.
  3. Take a flight plan and GO!
  4. The moment the FSX shows an error, make note of the time
  5. Look in the Process Explorer if it could be an Memory Error (Current > Limit)
  6. Open Event Manager clicking Start button, type “event, select Event Viewer
  7. In Event Viewer Select Administrative Events and look for the event that corresponds with the time of occurrence
  8. Most of the time you will read Application Error or Application Hang
  9. Now find which module causes the error (e.g. g3d.dll or ai_player.dll)

Windows Task Manager and Process Explorer
In the Performance tab,total system memory used (RAM plus page file) and maximum available are shown in the Commit Charge(K) panel, listed as Current and Limit respectively.
Total RAM and Available RAM is listed in the Physical Memory (K) panel.
The Page File Usage panel displays the total commit charge graphically as a bar graph and, over time, as Commit History.
Note that for the Task Manager, Page File Usage does not mean just Page File or SWAP file; it means total system memory used (RAM plus page file).
Note that some numbers are listed in KB which will look slightly different from the other numbers listed in MB.

Under the processes tab, the value listed in the memory column is RAM only and not total memory used by Image Name

  1. If you did not already have this tool on board….download VMMap from here
  2. Lanch VMMap and select the process FSX
  3. In the view sort the Details Column and find the .dll involved
  4. So, .dll is called from FSX folder or else? Now you know!
  5. Now that you located the .dll, go to this website
  6. Search for the .dll in the library (on the menu @ the right side of the screen)
  7. Download the tool, repair the dll’s ( most of the time more than 1…)
  8. Done

If you wan the tool for 30-days free….install the download , run once, select repair, then you get a warning…STOP

Uninstall the application via the All Programs…and then a screen pops up for a 30-day free use! Fill the form, receive the key and there you go!