You can specify a page size for a standard or temporary dbspace if you want a longer key length than is available for the default page size. The root dbspace is the default page size. If you want to specify a page size, the size must be an integral multiple of the default page size, and cannot be greater than 16 kilobytes.
For systems with sufficient storage, the performance advantages of a larger page size include:
Additional performance advantages occur because you can:
You can use the BUFFERPOOL configuration parameter to create a buffer pool that corresponds to the page size of the dbspace. (You might want to do this to implement a form of "private buffer pool.")
A table can be in one dbspace and the index for that table can be in another dbspace. The page size for these partitions can be different.
If you want to specify the page size for the dbspace, perform these tasks:
If you create a dbspace with a page size that does not have a corresponding buffer pool, Dynamic Server automatically creates a buffer pool using the default parameters defined in the ONCONFIG configuration file.
You cannot have multiple buffer pools with the same page size.
For more information, see Creating a Dbspace with a Non-Default Page Size.
For example, if you create a dbspace with a page size of 6 kilobytes, you must create a buffer pool with a size of 6 kilobytes. If you do not specify a page size for the new buffer pool, Dynamic Server uses the operating system default page size (4 kilobytes on Windows and 2 kilobytes on most UNIX platforms) as the default page size for the buffer pool.
When you create a buffer pool, you can use the BUFFERPOOL configuration parameter or the onparams utility to define information about the buffer pool including its size, the number of LRUS in the buffer pool, the number of buffers in the buffer pool, and lru_min_dirty and lru_max_dirty values.
You specify this information using the BUFFERPOOL configuration parameter.
The BUFFERPOOL configuration parameter consists of two lines in the onconfig.std file.
On UNIX machines, the lines are:
BUFFERPOOL default,lrus=8,buffers=5000,lru_min_dirty=50,lru_max_dirty=60 BUFFERPOOL size=2K,buffers=5000,lrus=8,lru_min_dirty=50,lru_max_dirty=60
On Windows machines, the lines are:
BUFFERPOOL default,lrus=8,buffers=2000,lru_min_dirty=50,lru_max_dirty=60 BUFFERPOOL size=4K,buffers=2000,lrus=8,lru_min_dirty=50,lru_max_dirty=60
The top line specifies the default values that are used if you create a dbspace with a page size that does not have a corresponding buffer pool that was created when the database server started. The line below the default line specifies the database server default values for the buffer pool. These values are based on the default page size of the database server.
When you add a dbspace with a different page size with the onspaces utility or when you add a new buffer pool with the onparams utility, a new line is added to the BUFFERPOOL configuration parameter in the ONCONFIG file. The page size for each buffer pool must be a multiple of the default page size for your operating system. The following example shows a third BUFFERPOOL line that was added to the ONCONFIG file:
BUFFERPOOL default,lrus=8,buffers=5000,lru_min_dirty=50,lru_max_dirty=60 BUFFERPOOL size=2K,buffers=5000,lrus=8,lru_min_dirty=50,lru_max_dirty=60 BUFFERPOOL size=6K,buffers=3000,lrus=8,lru_min_dirty=50,lru_max_dirty=60
The fields in the BUFFERPOOL lines are not case sensitive, so you can specify lrus or Lrus or LRUS). These fields can appear in any order.
If you do not specify a page size for a new buffer pool, Dynamic Server uses the operating system default page size (4 kilobytes on Windows and 2 kilobytes on most UNIX platforms) as the default page size for the buffer pool.
If the value of buffers is zero (0) or if the value of buffers is missing in the BUFFERPOOL configuration parameter, Dynamic Server will not create the buffer pool of the specified page size.
The table below provides an explanation of the values that you specify using the BUFFERPOOL configuration parameter or the onparams utility.
If the database server is in online, quiescent, or single user mode, you can also use the onparams utility to add a new buffer pool of a different size. When you use the onparams utility, the information you specify is automatically transferred to the ONCONFIG file and new values are specified using the BUFFERPOOL keyword. You cannot change the values by editing the onconfig.std file.
When you use the onparams utility, you specify information as follows:
onparams -b -g <size of buffer page in Kbytes> -n <number of buffers> -r <number of LRUs> -x <max dirty (fractional value allowed)> -m <minimum dirty (fractional value allowed)>
For example:
onparams -b -g 6 -n 3000 -r 2 -x 2.0 -m 1.0
This adds 3000 buffers of size 6K bytes each with 2 LRUS and lru_max_dirty set at 2 percent and lru_min_dirty set at 1 percent.
For more information on the onparams utility, see the IBM Informix Dynamic Server Administrator's Reference.
Recommendation: Set the PHYSBUFF configuration parameter to a multiple of your largest page size. For example, if your largest page size is 16 kilobytes, you can set the PHYSBUFF parameter to 32.
The LG_ADDBPOOL log record and the sysbufpool system catalog table contain information on each buffer pool.
Buffer pools that are added while the database server is running go into virtual memory, not into resident memory. Only those buffer pool entries that are specified in the ONCONFIG file at startup go into resident memory, depending on the availability of the memory you are using.
If you need to resize an existing buffer pool, you must bring down the database server. Then change the buffer pool size in the ONCONFIG file.
If you need to delete an existing buffer pool, you must bring down the database server. Then, in the ONCONFIG file, delete the buffer pool.
Use the onspaces -k option to set the page size in kilobytes, as follows:
onspaces -c -d DBspace [-t] [-k pagesize] -p path -o offset -s size [-m path offset]
The root dbspace is the default page size.
If you specify a page size, the page size must be a multiple of the default page size, but not greater than 16 kilobytes.
If you are using ON-Monitor to create a dbspace, be sure to enter the page size in kilobytes in the Page Size field.
For more information about using the ON-Monitor and onspaces utilities, see the IBM Informix Dynamic Server Administrator's Reference.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]