To pin Db2 database shared
memory on AIX® operating systems, you must configure some
operating system parameters and then set the DB2_PINNED_BP registry
variable.
Before you begin
You
must have root authority to perform the AIX operating
system commands.
About this task
The
advantage of having portions of memory pinned is that when you access
a page that is pinned, you can retrieve the page without going through
the page replacement algorithm. A disadvantage is that you must take
care to ensure that the system is not overcommitted, as the operating
system will have reduced flexibility in managing memory. Pinning too
much memory results in heavy paging activities for the memory pages
that are not pinned.
Restrictions
If
you set the DB2_PINNED_BP registry variable to YES,
self tuning for database shared memory cannot be enabled.
Procedure
To pin Db2 database shared
memory on AIX operating systems:
- Configure the AIX operating
system to enable pinned memory.
Issue the vmo command
with the following flags:
vmo -p -o v_pinshm=1
For
detailed instructions on how to run the vmo command,
refer to your AIX manuals.
-
(Optional) If you are using medium sized pages (which is the default behavior), ensure that the
Db2 instance
owner has the CAP_BYPASS_RAC_VMM and CAP_PROPAGATE capabilities.
For
example:
chuser capabilities=CAP_BYPASS_RAC_VMM,CAP_PROPAGATE db2inst1
where
db2inst1 is the
Db2 instance owner user
ID.
- Run the bosboot command so that the vmo command
will take effect following the next system boot.
-
After the server comes up, enable the Db2 database system for
pinned memory.
-
Issue the db2set command to set the DB2_PINNED_BP
registry variable to YES.
-
Start the Db2 database manager.
For example:
db2set DB2_PINNED_BP=YES
db2start
Results
When
these steps are complete, the Db2 database system
directs the operating system to pin the Db2 database shared
memory.