onparams -b: Add a buffer pool
Use the onparams -b command to create a buffer pool that corresponds to the page size of the dbspace.
>>-onparams-- -b-- -g--size------------------------------------><
Element | Purpose | Key considerations |
---|---|---|
-b | Creates a buffer pool | You can add a buffer pool while the database server is running. |
-g size | Specifies the size in KB of the buffer pages to create | The size of the buffer pages must be 2 - 16 KB and a multiple of the default page size. |
Element | Purpose | Key considerations |
---|---|---|
-b | Creates a new buffer pool | You can add a new buffer pool while the database server is running. |
-g size | Specifies the size in kilobytes of the buffer pages to create | Each dbspace you create with a non-default page
size must have a corresponding buffer pool with the corresponding
page size. If you create a dbspace with a page size that has no buffer
pool, the system will automatically create a buffer pool using the
fields in the default line of the BUFFERPOOL parameter. The size of the buffer pages must be between 2 and 16 kilobytes and it must be a multiple of the default page size. |
-m percent | Specifies the percentage of modified pages in the LRU queues at which page cleaning is no longer mandatory | Fractional values are allowed. If you do not specify this option, the percentage used is the value of the lru_min_dirty field as set in the default line of the BUFFERPOOL configuration parameter. |
-n number | Specifies the number of buffers in the buffer pool | The range is 500 - 2147483647. If you do not specify this option, the number used is the value of buffers as set in the default line of the BUFFERPOOL configuration parameter. |
-r number | Specifies the number of LRU (least-recently-used) queues in the shared-memory buffer pool | Range of values:
If you do not include this option, the number of LRU queues allocated is equal to the value of lrus as set in the default line of the BUFFERPOOL configuration parameter. |
-x percent | Specifies the default percentage of modified pages in the LRU queues at which the queue is cleaned | Fractional values are allowed. If you do not specify this option, the percentage used is the value of lru_max_dirty as set in the default line of the BUFFERPOOL configuration parameter. |
The values of the elements correspond to the values of the fields of the BUFFERPOOL configuration parameter.
All other characteristics of the buffer pool that you create are set to the values of the fields in the default line of the BUFFERPOOL configuration parameter.
Each dbspace that you create with a non-default page size must have a corresponding buffer pool with the corresponding page size. If you create a dbspace with a page size that has no buffer pool, the system automatically creates a buffer pool based the fields in the default line of the BUFFERPOOL parameter.
You should create a buffer pool for a dbspace before you create the dbspace. You cannot reduce or increase the number of buffers in an existing buffer pool while the database server is running. You also cannot drop a buffer pool while the database server is running. You can, however, add new buffer pools with a new size while the database server is running.
Buffer pools added with the onparams utility are put into virtual memory, not into resident memory. Upon restart, buffer pool entries will go into resident memory depending on the amount of memory that is available.
When you add a buffer pool, a new entry for the BUFFERPOOL configuration parameter is added in the onconfig file.
This command has an equivalent SQL administration API function.