Measuring memory use with Task Manager

You may wish to know how much memory is used by your GEMPACK simulation. The instructions below show how to do this on Windows using Task Manager.

When memory (RAM) is short, Windows is able to use hard disk space instead (called "paging") -- at the cost of a severe speed reduction. If your GEMPACK program is starved of RAM it will run very slowly. Also, the operating system and background processes consume quite a bit of memory. Use Task Manager, as follows, to investigate how much memory is required to meet background needs, and to run one simulation. If you have enough memory, you may be able to run two or more simulations at once.

Starting Task Manager

Close all programs, then open email and a small Word document (small tasks you might want to do while a simulation was running). Right-click on the task bar (normally at the bottom of screen) and activate Task Manager. Select the Performance tab. You should see something like:

Task Manager

The red circles indicate items of interest:

Thus, Windows is using considerable resources in the background before you even start trying to run a large simulation !

Now start a large GEMPACK simulation running. Then, in Task Manager, select the Processes tab. You should see something like:

Task Manager

Click once or twice on the "Mem usage" column heading to bring your GEMPACK program to the top, and see how much memory it is using. In this example, GTAP.EXE is using 503 megabytes to do a 60-region, 57 sector simulation (similar information will be found near the end of your solution log file). With the 348MB background requirement, 851 MB is needed in total. More regions or sectors would require more RAM.

Such a large simulation will not be quick: you will be strongly tempted to put your multi-core CPU to work. You could do this by manually launching two or more simulations at once; for recursive dynamic models the RunDynam shell program will automate the processs. In this case, no one simulation is faster, but the total job is done sooner. In contrast, GEMPACK 10 or later allows for parallel processing to speed up a single simulation: it splits up one simulation into parts. You can specify how many additional jobs (called 'servants') are created. In each case:

Related topics:
Reducing Simulation Time
Condensation and Solution Speed
Not Enough Memory to Solve a Model
Memory Limit for GEMPACK
64-bit computing and parallel computations with GEMPACK 10
Should I move to 64-bit Windows?
Choosing a new PC for GEMPACK simulations

Go back to