ANSYS Memory and Disk Space Management

The way that ANSYS utilizes memory has been enhanced over the last few releases. In the old days, we specified workspace and database memory allocations (or accepted the defaults) and those are the amounts of memory ANSYS used for the entire session.

Starting around release 5.5, ANSYS started to dynamically allocate memory under certain circumstances. Normally this was during model solution, for certain solvers. ANSYS still does dynamic memory allocation, but now there are more options in implementing this. We’ll describe the different options and how they work.

First, some terminology.

Total Workspace. This is the total amount of memory that ANSYS can use, whether it be for the nodes and elements, loads, results database, as well as memory needed to perform Boolean operations or solution calculations.

Database Space. This is a subset of the total workspace that has been designated for items contained in the ANSYS database. This includes nodes, elements, loads, geometry, and also includes results data once we issue the SET command in the General Postprocessor.

Database. This is the in-memory data that describes your model’s nodes, elements, geometry, loads, material properties, etc. This is what gets written to the hard disk when you perform the SAVE operation.

Database File or .db File. This is the file that resides on your hard disk after you perform the SAVE operation. It is a “snapshot” of the state of your model when you performed the save.

Scratch Space. Sometimes called heap space. This is the amount of memory that is the difference between the total workspace and the database space. This is the memory available for calculations, such as Boolean operations in the preprocessor, as well as solution calculations.

Page File. In regards to running ANSYS, this is the ANSYS-created jobname.page file in the working directory on your hard disk. If it has nonzero size, it is being used as virtual memory to increase the database space memory over what has been specified. Note that there may also be operating system usage of a page file (see system page file ), which is a different concept that happens to share the same terminology.

System Page File. This is the computer operating system’s virtual memory. It is a portion of your hard disk that has been set aside for the operating system to use as supplemental memory above and beyond the physical amount of RAM in your computer.

There are two scenarios we’ll look for utilizing memory in ANSYS.

Scenario 1. Explicitly specifying workspace and database space.

This is done either on the command line using –m and –db, or from the ANSYS launcher by specifying values in the Total Workspace and Database fields. The default values for ANSYS 7.1 and 8.0 are shown in Table 1.

Version Database Space Total Workspace
ANSYS 7.1 Windows 32 MB 64 MB
ANSYS 7.1 Unix 64 MB 128 MB
ANSYS 8.0 Windows 256 MB 512 MB
ANSYS 8.0 Unix 256 MB 512 MB

Table 1. ANSYS default memory allocations.

We can specify our own settings to change the values from the defaults. Note that since the database space will always be a subset of the total workspace, the value specified for the database must be less than that specified for the total workspace. As a rule of thumb, we normally recommend making the total workspace at least twice the value specified for the database.

So how does a user know when to use the default settings and when to specify explicit values? Two main considerations come into play. First, are we solving, or are we pre- or post-processing? If we are just solving, then we can live with a small value for the database space, and therefore maximize the amount of memory available as scratch space. It’s scratch space that will be most used for solving.

On the other hand, if we’re doing mostly pre- or post-processing, we’ll be accessing the database space a lot, so we’ll want to make sure we specify enough database space that ANSYS won’t create its jobname.page file. The .page file tends to really slow down our plotting. If you’re working interactively and you see the message,

Note: ANSYS page file being use.

This is your cue to save what you’re doing, get out of ANSYS and get back in with a larger specification for the database space. How do you know how large of an amount to specify? You want the amount of memory allocated for the database space to be larger than the hard disk space that will be taken up when you save the database. In other words, if your .db file takes up 120 MB on your hard disk, you’ll want to specify more then 120 MB for the database space. If you don’t, ANSYS will create its jobname.page file and your plotting will get very slow.

Further, if you are doing postprocessing, your results will also be stored in the in-memory database. The results typically take up the same amount of room in memory as the “preprocessing”' database. This means that when you’re postprocessing you should make the database space allocation at least twice the amount of space that the .db file takes up on the hard disk. Otherwise, the .page file will be created and your plotting will bog down.

One thing to be aware of is that although ANSYS cannot increase the amount of memory allocated to the database space, it can and does dynamically allocate the total workspace, if necessary (unless one uses the –f option discussed below). This increased allocation may happen during Boolean operations or during a solution. If not enough memory is available to the solver, for example, ANSYS will attempt to allocate more, including the memory available in our RAM as well as system virtual memory. ANSYS cannot dynamically allocate forever, though, as it is limited by the amount of contiguous memory available, as well as a system limitation. The amount of memory available depends on how much RAM we have, how much virtual memory is specified on our system, and how much memory is being utilized by the operating system and other applications. The system limitation for ANSYS memory allocation on most Windows systems is 1,700 MB (and only 1,400 MB are available via the –m option). This means that no matter how much RAM and virtual memory you have, ANSYS cannot allocate more 1.7 GB of total workspace. The exception to this limit is with Windows 2000 Server and Windows XP when there is 4 GB of physical RAM on the computer. When this is the case, there is a 3 GB operating system switch that can be set that will allow ANSYS to address 3 GB for the database. Table 2 shows ANSYS total workspace limits for various operating systems.

Hardware Platform Maximum -m Value
Compaq Alpha 16,383 MB
HP PA8000 32-bit 1,880 MB
HP PA8000 64-bit 16,383 MB
HP Itanium IA64 16,383 MB
IBM RS/6000 32-bit 2,047 MB
IBM RS/6000 64-bit 16,383 MB
SGI 32-bit 2,047 MB
SGI 64-bit 16,383 MB
Sun UltraSPARC 32-bit 2,047 MB
Sun UltraSPARC 64-bit 16,383 MB
Intel IA-32 Linux 2,040 MB
Intel IA-32 Windows 2000 1,700 MB
Intel IA-32 Windows NT 4.0 1,700 MB

Table 2. ANSYS memory limits for various operating systems.

Scenario 2. Using the default memory model.

Starting with version 6.1, ANSYS has implemented the default memory model, which attempts to take some of the difficulty out of memory allocation, and it attempts to allow more memory to be utilized for scratch space by reducing the dependency on the availability of contiguous blocks of memory. The default memory model starts with the default settings (see Table 1) and will dynamically allocate total workspace as needed.

Memory that we explicitly specify for the workspace (-m) must be in one contiguous block. Whereas if we allow ANSYS to dynamically allocate it, the memory does not have to be in one contiguous block. Also, with the default memory model we’re not tying up memory allocated to the workspace that may be too big. This means we’ll have more memory available to other applications or the ANSYS help system.

The big drawback of the default memory model in versions 6.1 through 7.1 is that the amount of memory allocated to the database space remains fixed at 32 MB. That means that if you need more than that for pre- and post-processing a model, ANSYS will create its jobname.page file and your plotting will slow down dramatically. For this reason, we at PADT recommend the default memory model for solving, but not for pre- and post-processing, unless you’re working with a fairly small model for which the database space never exceeds 32 MB.

What if I don’t want ANSYS to dynamically allocate memory at all?

By default, no matter which method we use to specify memory, ANSYS will attempt to dynamically allocate total workspace if it needs it. If for some reason you don’t want ANSYS to do this, the feature can be turned off with the “fixed memory option”. This can be activated by specifying –f on the command line, or by MEM_GRO to zero in your configuration file. More information on the –f option and memory in general can be found in the ANSYS online help’s Basic Analysis Procedures Guide, Section 19.

Are there circumstances when ANSYS won’t dynamically allocate memory at all?

As of version 7.1, ANSYS doesn’t support dynamic memory allocation on 64-bit Intel systems or Linux systems. Also, there is a documented feature of –f nogrow on startup that intends to disable the dynamic memory manager. However, from version 6.1 to 8.0 on Windows (and maybe UNIX) a program bug prevents the –f nogrow from functioning. The plain –f command performs as documented.

How else can I control dynamic memory allocation?

There are a few knobs to turn within the ANSYS configuration file. The configuration file can contain some settings that ANSYS will use every time you start up the program. The list off all the available options is shown in Section 19.4 of the Basic Analysis Procedures Guide. The settings that affect memory and memory allocation are:

More details on these parameters are given in Section 19.4 of the Basic Analysis Procedures Guide.

How much memory do I need for my run?

It’s problem-dependent, but as a rule of thumb, plan on a workspace of 1 GB per million degrees of freedom in the model. For example, a shell model with six degrees of freedom at each node and 100,000 nodes would have 600,000 degrees of freedom and would require 600 MB of workspace. Different solvers require different amounts of memory, so this rule can vary. The PCG solver, for example, normally needs more memory than the sparse solver.

Besides memory, how much disk space do I need for my run?

Again, it’s problem-dependent, but as a rule of thumb plan on 10 GB of disk space per million degrees of freedom. That means our 100,000 node shell model would need 6 GB of space on the hard disk to solve. Different solvers require different amounts of disk space, so again the rule can vary. The PCG solver normally requires less disk space than the sparse solver.

When ANSYS runs out of disk space, it typically produces an error such as

****  FATAL  ***        
Random write error on unit 7, possible full disk
I/O status error = 9

Sometimes the hard disk may be getting full due to scratch files being created during solution, yet after the job has terminated the disk may not be full. This is because some of the scratch files get deleted as the job terminates. If you suspect that your hard disk is filling up, obviously you can try freeing up space. Another option is to use the /ASSIGN command to assign large files to be written to a directory on another hard disk, if possible.

Sometimes this error can occur even if the hard disk is not full. Typically this means that you have reached a maximum file size for your operating system. The /CONFIG,FSPLIT command may be needed to split the file to avoid this limitation. Files size limits vary by operating system and file system, but on Windows 2000, for example, the maximum file size will be at least 4 GB. Detailed information for Windows systems can be found on the Microsoft web site.

How can I find out how much memory and disk space my model needs?

In addition to the guidelines given above, you can have ANSYS predict resource requirements with the Run Time Statistics. Run-Time Stats are available in the ANSYS Main Menu, or with the RALL command. Keep in mind the statistics provided are estimates and may or may not accurately predict the amount of memory and disk space needed. In most cases, however, the run time stats can give you a good idea of the resources needed to solve your model.

If you have further questions, check the ANSYS documentation. You can also contact PADT’s technical support group if you are a PADT Tech Support customer.