Virtual portion of shared memory
OneDB uses the virtual portion of shared memory to allocate memory to each database server subsystem, as needed.
- Large buffers, which are used for large read and write I/O operations
- Sort-space pools
- Active thread-control blocks, stacks, and heaps
- User-session data
- Caches for SQL statements, data-dictionary information, and user-defined routines
- A global pool for network-interface message buffers and other information
The SHMVIRTSIZE configuration parameter in the onconfig file provides the initial size of the virtual portion. As the need for additional space in the virtual portion arises, the database server adds shared memory in increments that the SHMADD configuration parameter specifies. The EXTSHMADD configuration parameter configures the size of the virtual-extension shared memory segments that are added for user-defined routines and DataBlade® routines. The limit on the total shared memory allocated to the database server is specified by the SHMTOTAL parameter.
The size of the virtual portion depends primarily on the types of applications and queries that you are running. Depending on your application, an initial estimate for the virtual portion might be as low as 100 KB per user or as high as 500 KB per user, plus an additional 4 megabytes if you intend to use data distributions.
When a computer supports forced residency and the RESIDENT configuration parameter is set to a value that locks virtual segments, the virtual segments that are locked are never paged out.
On AIX®, Solaris, and Linux™ systems that support large pages, the IFX_LARGE_PAGES environment variable can enable the use of large pages for non-message shared memory segments that are locked in physical memory. If large pages are configured by operating system commands and the RESIDENT configuration parameter specifies that some or all of the resident and virtual portions of shared memory are locked in physical memory, OneDB uses large pages for the corresponding shared memory segments, provided sufficient large pages are available. The use of large pages can offer significant performance benefits in large memory configurations.