STScI Logo

Hubble Space Telescope
APT Memory Considerations

The amount of memory that is needed by APT is variable depending on the size of your proposal and the amount of work you try to do in one particular session. Memory problems are more common in Phase II than Phase I due to the larger volume of data and more complex tools, but there can be problems with large Phase I proposals.

Choose the best available machine

Minimum memory requirement is 256 MB, but we recommend 512 MB (or more).

A machine with 512 MB of physical memory will be fine for most proposals and even reasonably long work sessions. So we recommend that if you have access to such a machine that you use it for APT. A machine with 256 MB will be adaquate for smaller sized proposals (about 30 exposures total) as long as you don't run other applications and save and shut down APT regularly.

To determine how much memory a machine has, use the "top" command on unix platforms, Start>Control Panel>System on a PC, or Apple Icon>About This Mac.

Choose the option appropriate for your machine's memory

You can run into memory problems with APT even if your machine has 2 GB of memory. This is because APT (actually the Java inside APT) has a built in memory limit. By default this memory limit (maximum heap size) is set to 630 MB.

To allow people with more memory to take advantage of it, there is a panel during the installation process which prompts you for how much memory your machine has. If your machine has 2GB or more of memory you should choose the third installation option (which will give you a 1.3 GB maximum heap size for APT). The larger the heap size the less likely you are to run into memory problems while running APT.

Note that if you are using a site installation of APT the person who installed it may have chosen the smallest heap size. If you would like to take advantage of the the memory on your machine, install APT directly on your machine.

What memory problems look like

There are two symptoms of memory problems to be aware of:

To determine if a memory problem exists, you can use the APT memory monitor (click on Help>Show Memory Monitor). This monitor will show you APT's currently allocated memory (which will likely be the maximum heap size), and how much memory APT is currently using. If the monitor shows that APT is close to that allocation, you need to free up some memory. You can do this by clicking on the "GC" (garbage collect) button at the bottom of the window a couple of times. You should also immediately save your proposal. If you are experiencing the second symptom (fatal error), you should also quit APT and start again.

Managing memory problems

If you find that you are having recurrent memory problems you can try the following approaches:

Special advice for very big programs

We have developed detailed advice for people working on very big programs.