Self-tuning memory in partitioned database environments
When using the self-tuning memory feature in partitioned database environments, there are a few factors that determine whether the feature will tune the system appropriately.
When self-tuning memory is enabled for partitioned databases, a single database partition is designated as the tuning partition, and all memory tuning decisions are based on the memory and workload characteristics of that database partition. After tuning decisions on that partition are made, the memory adjustments are distributed to the other database partitions to ensure that all database partitions maintain similar configurations.
The single tuning partition model assumes that the feature will be used only when all of the database partitions have similar memory requirements. Use the following guidelines when determining whether to enable self-tuning memory on your partitioned database.
Cases where self-tuning memory for partitioned databases is recommended
- All database partitions are on identical hardware, and there is an even distribution of multiple logical database partitions to multiple physical database partitions
- There is a perfect or near-perfect distribution of data
- Workloads are distributed evenly across database partitions, meaning that no database partition has higher memory requirements for one or more heaps than any of the others
Cases where self-tuning memory for partitioned databases is recommended with qualification
In cases where most of the database partitions in an environment have similar memory requirements and are running on similar hardware, it is possible to use self-tuning memory as long as some care is taken with the initial configuration. These systems might have one set of database partitions for data, and a much smaller set of coordinator partitions and catalog partitions. In such environments, it can be beneficial to configure the coordinator partitions and catalog partitions differently than the database partitions that contain data.
Self-tuning memory should be enabled on all of the database partitions that contain data, and one of these database partitions should be designated as the tuning partition. And because the coordinator and catalog partitions might be configured differently, self-tuning memory should be disabled on those partitions. To disable self-tuning memory on the coordinator and catalog partitions, set the self_tuning_mem database configuration parameter on these partitions to OFF.
Cases where self-tuning memory for partitioned databases is not recommended
If the memory requirements of each database partition are different, or if different database partitions are running on significantly different hardware, it is good practice to disable the self-tuning memory feature. You can disable the feature by setting the self_tuning_mem database configuration parameter to OFF on all partitions.
Comparing the memory requirements of different database partitions
The best way to determine whether the memory requirements of different database partitions are sufficiently similar is to consult the snapshot monitor. If the following snapshot elements are similar on all database partitions (differing by no more than 20%), the memory requirements of the database partitions can be considered sufficiently similar.
get snapshot for database on <dbname>
Locks held currently = 0 Lock waits = 0 Time database waited on locks (ms) = 0 Lock list memory in use (Bytes) = 4968 Lock escalations = 0 Exclusive lock escalations = 0 Total Shared Sort heap allocated = 0 Shared Sort heap high water mark = 0 Post threshold sorts (shared memory) = 0 Sort overflows = 0 Package cache lookups = 13 Package cache inserts = 1 Package cache overflows = 0 Package cache high water mark (Bytes) = 655360 Number of hash joins = 0 Number of hash loops = 0 Number of hash join overflows = 0 Number of small hash join overflows = 0 Post threshold hash joins (shared memory) = 0 Number of OLAP functions = 0 Number of OLAP function overflows = 0 Active OLAP functions = 0
get snapshot for bufferpools on <dbname>
Buffer pool data logical reads = 0 Buffer pool data physical reads = 0 Buffer pool index logical reads = 0 Buffer pool index physical reads = 0 Total buffer pool read time (milliseconds) = 0 Total buffer pool write time (milliseconds)= 0