Linux Kernel 2.4 and Higher

The tmpfs file system was introduced with the Linux kernel 2.4. This file system supports POSIX shm_* calls and therefore makes it possible to use the new SAP memory management function.

Technical Prerequisites

The following technical prerequisites have to be fulfilled:

  • tmpfs is mounted on /dev/shm.
  • tmpfs has to be mounted with a fixed size (such as 2 GB).

If you do not specify a fixed size, the Linux kernel uses half the size of the main memory by default. This is usually too small for operation an SAP system.

An entry in the file /etc/fstab, which controls these factors, might look like this:

tmpfs /dev/shm tmpfs size=2G 0 0

Improvements on Linux Kernel 2.4

The following improvements on the Linux kernel 2.4 enable the use of the new memory management function:

  • The shared memory is now restricted only by the virtual address space.
  • Up to 64 GB of physical memory can now be addressed. However, due to architectural limitations, SAP currently recommends that you do not implement systems with more than 32 GB of main memory.

Configuring SAP Instances

How you configure an SAP instance depends on what SAP release you have.

See the section Old or New Memory Management? for information on how to activate the new memory management function.

Old Memory Management

When using the old memory management function, note the following:

  • Configuration is basically the same as for Linux kernel 2.2 (see Linux Kernel 2.2).
  • If you want to get the best use from large machines with more than 4 GB main memory, you have to install multiple SAP instances on one machine. (As described above, an SAP instance can use 2 - 2.2 GB at most.) You can increase the heap quotas if you need to assign more memory to a user context. Note that you may then have to configure more work processes.

New Memory Management Function

The new memory management function allows you to work with much larger user contexts. One user can now use 1.2 GB of EM, whereas before this was the limit for all user contexts.

Only the main memory and the swap space limit the size of the EM backing store in the tmpfs. You should of course make sure that excessive swapping does not occur, especially if you are working with large machines.

The large maximum size of a user context in the EM (parameter em/address_space_MB) means that high heap quotas should not be required.

On very large machines (8 GB and more), it may make sense to run two SAP instances on the new implementation. That way, you can assign each instance to one SAP module (such as FI or HR), thus optimizing your SAP buffers.

See also:

SAP note 386605 describes in detail how to use the new memory management function, the prerequisites for using the new memory management function, and sample configurations. The note will be updated sooner than this documentation in the case of any changes being made.