7.1 Kernel: Page-Cache Limit

Problem

The kernel swaps out rarely accessed memory pages to use freed memory pages as cache to speed up file system operations, for example during backup operations.

SAP NetWeaver and SAP HANA use large amounts of memory for accelerated access to business data. Parts of this memory are rarely accessed. When a user request needs to access paged-out memory, the response time is poor. It is even worse when an SAP application running on Java incurs a Java garbage collection: The system starts heavy page-in (disc I/O) activity and has a poor response time for an extended period of time.

Solution

SUSE Linux Enterprise Server for SAP Applications includes a kernel tuning option that allows the system administrator to limit the amount of page cache that the kernel uses when there is competition between application memory and page cache. This option tells the kernel that when the page cache is filled to the configured limit, application memory is more important and should thus not be paged out. No pages will be paged out if the memory footprint of the workload plus the configured page-cache limit do not exceed the amount of physical RAM in the system.

These kernel options are available for configuration:

  • vm.pagecache_limit_mb (/proc/sys/vm/pagecache_limit_mb)

  • vm.pagecache_limit_ignore_dirty (/proc/sys/vm/pagecache_limit_ignore_dirty)

HINT: Use tuned to Configure These Parameters

The parameters vm.pagecache_limit_mb and vm.pagecache_limit_ignore_dirty are also configured by the tuned profiles delivered with the package sapconf.

For more information, see Section 7.2, Tuning Systems with saptune.

IMPORTANT: The Following Are Example Values

The values reproduced in Example 7-1 are example values only. Do not set the following parameters on a productive system without first trying and calibrating them on a non-productive system.

If your system does not exhibit page-cache limit issues under the workloads it is running, there is no need to adjust these parameters.

For more information, see SAP Note 1557506: Linux Paging Improvements (https://launchpad.support.sap.com/#/notes/1557506).

Example 7-1 Permanently Setting the Page-Cache Limit

For permanent use, add both parameters to /etc/sysctl.conf, for example:

vm.pagecache_limit_mb = 1024
vm.pagecache_limit_ignore_dirty = 2