solidDB Help : Configuring and administering : Performance tuning : Switching memory allocation models : Linux: Switching memory allocation model and configuring huge pages
  
Linux: Switching memory allocation model and configuring huge pages
In solidDB Version 100.0.5 and later on Linux 64-bit platforms, you can choose to use any of the following memory allocation models:
malloc()
mmap()
mmap() suballocator with huge pages support.
solidDB uses malloc() as the default allocator as it typically requires less administration than other models.
Note Linux provides mechanisms to configure the internal behavior of malloc() by using the mallopt switch, see -x mallopt: option, value. However, the use of the mallopt switch is not recommended unless specified by solidDB support.
However, if you choose to use the mmap() memory allocation model, you can also configure solidDB to use Linux huge pages to get improved performance.
Choosing mmap() and configuring huge pages support
To use mmap() as the memory allocator, add the following line to the [General] section in the solid.ini file:
MemoryAllocator = mmap
To use mmap() as the memory allocator and configure huge pages, add the following lines to the [General] section in the solid.ini file:
MemoryAllocator = mmap
HugePageSize = size
where size is either 2M (2Mb) or 1G (1Gb). If a valid value for HugePageSize is not specified, huge pages are not used.
Note When using mmap() to allocate memory, the system administrator must make sure that enough maps are configured in the system by setting vm.max_map_count to a sufficiently high level. The maximum map count should be larger than the number of pages that is used by the solidDB process. For example, a 128Mb process size is equal to 32,768 4Kb pages.
Considerations
When using the huge pages allocator, the following points must be taken into consideration:
A minor to significant memory overhead is experienced because the minimum allocation that solidDB uses is the size of a page.
Huge pages must be configured by a system administrator account.
The system administrator must configure the operating system to select the page size to be used.
The configured memory is not usable by processes or applications that are not aware of huge pages.
No memory is returned to the operating system; the memory is reused within solidDB. To release the memory back to the operating system, solidDB must be restarted.
solidDB has no access to normal pages which can lead to the under-utilization of system memory resources.
The 1Gb page size offers more performance benefits, but the memory overhead is greater as the minimum allocation size is always 1Gb even if only a fraction of the allocated memory is used.
The 2Mb page size offers less performance benefits, but has less memory overhead.
Note It is not possible to use mixed page sizes with solidDB; solidDB always uses the system default page size.
The number of huge pages in Linux is controlled by the kernel parameter vm.nr_hugepages. It is recommended to configure the number of pages at startup in order to avoid memory fragmentation.
Go up to
Switching memory allocation models