Home | Previous Page | Next Page   Disk, Memory, and Process Management > Managing Disk Space > Managing Dbspaces >

Creating a Dbspace with a Non-Default Page Size

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:

  1. Use the onmode -BC command to enable the large chunk mode if this mode is not enabled. By default, when Dynamic Server Version 10.0 is first initialized or restarted, Dynamic Server starts with the large chunk mode enabled. For information on the onmode utility in the IBM Informix Dynamic Server Administrator's Reference.
  2. Create a buffer pool that corresponds to the page size of the dbspace. You can use the onparams utility or the BUFFERPOOL configuration parameter. You should do this before you create the dbspace.

    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.

  3. Define the page size of the dbspace when you create the dbspace. You can use the onspaces utility or ON-Monitor. For more information, see Defining the 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.

Note:
If you use non-default page sizes, you might need to increase the size of your physical log. If you perform many updates to non-default pages you might need a 150 to 200 percent increase of the physical log size. Some experimentation might be needed to tune the physical log. You can adjust the size of the physical log as necessary according to how frequently the filling of the physical log triggers checkpoints.

Creating a Buffer Pool for the Non-Default Page Size

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.

Note:
Information that was specified with the BUFFERS, LRUS, LRU_MAX_DIRTY, and LRU_MIN_DIRTY configuration parameters prior to Version 10.0 is now specified using the BUFFERPOOL configuration parameter. Information you enter using the BUFFERPOOL configuration parameter supersedes any information previously specified with the deprecated parameters. For more information on the deprecated parameters, see the appendix that contains information on discontinued configuration parameters that is in IBM Informix Dynamic Server Administrator's Reference.

The table below provides an explanation of the values that you specify using the BUFFERPOOL configuration parameter or the onparams utility.

Field Explanation Range of Values
size Specifies the number of kilobytes, followed by the suffix K, in a page. The size can vary from 2K or 4K to 16 K. 2K is the default.
buffers

Specifies the number of buffers for the page size.

This is the maximum number of shared-memory buffers that the database server user threads have available for disk I/O on behalf of client applications. The number of buffers that the database server requires depends on the applications.

For example, if the database server accesses 15 percent of the application data 90 percent of the time, you need to allocate enough buffers to hold that 15 percent. Increasing the number of buffers can improve system performance.

The percentage of physical memory that you need for buffer space depends on the amount of memory available on your computer and the amount of memory used for other applications. For systems with a large amount of available physical memory (4 gigabytes or more), buffer space can be as much as 90 percent of physical memory. For systems with smaller amounts of available physical memory, buffer space can range from 20 to 25 percent of physical memory.

You should calculate all other shared-memory parameters after you set buffer space (buffers *system_page_size).

For 32-bit platform on UNIX

  • with page size equal to 2048 bytes:
    100 through 1,843,200 buffers
    (1843200 = 1800 * 1024
  • with page size equal to 4096 bytes:
    100 through 921,600 buffers
    (921,600 = ((1800 * 1024)/4096) * 2048 )

For 32-bit platform on Windows:
100 through 524,288 buffers
(524,288 = 512 * 1024)

For 64-bit platforms:
100 through 231-1 buffers
(For the actual value for your 64-bit platform, see your release notes. The maximum number of buffers on Solaris is 536,870,912.)

lrus Specifies the number of LRU (least-recently-used) queues in the shared-memory buffer pool for the page size. You can tune the value of LRUS, in combination with the lru_min_dirty and lru_max_dirty values, to control how frequently the shared-memory buffers are flushed to disk.

Setting LRUS too high might result in excessive page-cleaner activity.

1 through 128
lru_min_dirty Specifies the percentage of modified pages in the LRU queues at which page cleaning is no longer mandatory. Page cleaners might continue cleaning beyond this point under some circumstances. If a parameter is specified out of the range of values, then the default of 50.00 percent is set. 0 through 100 (fractional values are allowed)
lru_max_dirty Specifies the percentage of modified pages in the LRU queues at which the queue is cleaned. If a parameter is specified out of the range of values, then the default of 60.00 percent is set. 0 through 100 (fractional values are allowed)

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.

Resizing an Existing Buffer Pool

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.

Deleting an Existing Buffer Pool

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.

Defining the Page Size

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 ]