Managing Free Memory
Free memory is used by:
Activity |
Description |
AWT |
Pieces of AMP logic used for specific AMP tasks |
Parser tasks |
Pieces of PE logic responsible for parsing SQL |
Dispatcher tasks |
Pieces of PE logic responsible for dispatching work |
Scratch segments |
Temporary work space |
Messages |
Communication between vprocs |
Dictionary cache |
Dictionary steps for parsing |
Request cache |
Temporary space used when executing steps |
Determining Available Free Memory
The ResNode macro displays limited information on free memory. The ResNode report includes the Free Mem% column, which is the percentage of unused memory.
Adjusting for Low Available Free Memory
When the amount of available free memory dips too far below 100 MB (25,000 pages), some sites have experienced issues. 40 MB of free memory is the lowest acceptable amount. You can usually avoid problems if you configure your AMPs to have at least 135 MB of OS-managed memory per AMP. You can adjust the amount of available free memory by performing the following:
Assured Minimum Non-FSG Cache Size
Teradata recommends these guidelines for minimum non-FSG Cache size per AMP.
The above configuration guidelines help avoid performance issues with respect to memory swaps and paging, memory depletion, and CPU starvation when memory is stressed. Performance Management Recommendations
Many sites may require more free memory than the default calculated on “About Shared Memory” on page 533. Teradata recommends that you provide additional memory per AMP to free memory by setting the FSG Cache percent to a value less than 100%.
Use the following calculation:
FSG Cache percent = (FSG Cache - 39 MB * # AMPs) / FSG Cache
Memory Size (GB) |
Memory for Baseboard Drivers & 10 AMPs/2PE Vprocs |
FSG Cache (MB) |
Less 58 MB per AMP Vprocs |
FSG Cache Percent |
6.0 |
1854 |
4290 |
3822 |
89% |
8.0 |
1914 |
6278 |
5810 |
92% |
For large configurations, consider one or more of the following options to resolve I/O bottlenecks or excessive memory swapping:
Note: This is an internal tuning parameter, not the user-tunable RedistBufSize.
Potential Problems
A possible problem is when an application on a large configuration generates many messages over the BYNET with concurrent row redistributions involving all nodes.
The following are not a problem:
Row Redistribution Memory Requirement
To avoid the overhead of sending lots of little messages across the BYNET, buffers are used to batch up individual rows during the row redistribution process. Both load utilities and queries involve such redistribution, but their approach to outbound buffering is different.
Row redistribution for query processing uses separate single buffers per AMP for each node in the system. This means that the amount of memory required for redistribution in a node grows as the system grows.
The DBC Control Record RedistBufSize field controls the size of redistribution buffers. See “RedistBufSize” on page 542.
8 * 32 KB * number of nodes in system
Redistribution Buffer Resizing
The following example provides the calculations for resizing the redistribution buffer based on a configuration of 8 nodes at eight AMPs per node. (The system reserves 32MB per AMP).
The following example provides the calculations for a configuration of 96 nodes at 8 AMPs per node and shows that the requirement exceeds the system default:
Performance effects of high-volume redistribution processing include: