Swap Space Bottleneck During SAP Operation

Swap Space Bottleneck During SAP Operation
 
Symptom
Diverse error messages that refer to memory bottlenecks, or, more precisely, a swap space bottleneck. For example, System Panic; cmemreserve: reservation overrun; ENOMEM, Not enough core; ENOSPC, No space left on device; SIGDANGER (under AIX only). In the SAP System, the SAP system log message "no memory of class perm" is output.
 
This problem can occur with SAP processes and external processes as well. The relevant process cannot allocate anymore heap memory.
 
This can lead to the database operation being ended or SAP work processes being stopped.
 
Error messages in the SAP System appear in the developer trace files dev_disp, dev_w<n> in the system log and in dumps. The following messages may appear: TSV_TNEW_;._NO_ROLL_MEMORY; NO_MEM; NO_MEMORY; RESIZE_EM_ALLOC_ERROR, Storage class PERM. This problem mostly occurs if background jobs are active with large amounts of data.
 
Possible Causes There is no more swap space available
 
The highest value for one of the SAP profile parameters that limit the swap space usage has been exceeded. In this case, the following parameters are relevant:
abap/heap_area_dia, abap/heap_area_nondia and abap/heap_area_total.
 
The operating system limits for the process size (segment size) have been exceeded. For example, no more that 256 MB can be assigned under AIX and no more than 384 under SINIX.
 
Corrective action Increase the swap space or decrease the SAP Extended Memory. If the swap space already corresponds to the SAP recommendations, 1.5 to 2 GB may still be required. There should always be several hundred MB of free swap space available. You can reduce the maximum swap space need of the SAP System by reducing the value of parameter abap_heap_area_total. You can also distribute the load onto several application servers and increase the roll area. Check if the maximum process size (operating system parameters) is sufficient.

--- 
 
Does the SAP Start Instance stop if not enough swap space/memory?

Have been installing ECC 6.0 SR3 on azure with linux and MAxDB. The installation at the phase 'Start Instance' failed to start. In dev_w0 and dev_disp found about some error as below.
ERROR => shmat(80248863,0x(nil),SHM_RND) (12: Cannot allocate memory) [shmux.c 1600].
Is it regarding a swap space memory or physical memory have physical memory of 7GB and swap space 23GB.

Answer:
Is the MaxDB database running on the same host where the SAP instance is running? if yes, then you will need more memory. First check memory assigned for database and for SAP. You should then consider increasing the memory on the machine.

Run sappfpar against the instance profile and fix any errors present in the output.
sappfpar check pf=/usr/sap/SD8/SYS/profile/SD8_DVEBMGS00_smartdocs

If the issue happens again then supply the contents of the instance profile - /usr/sap/SD8/SYS/profile/SD8_DVEBMGS00_smartdocs

You should also make sure that the SUSE Linux kernel parameters are set correctly for SAP systems.
 
---
 
Swap Space Size: Oracle 11g on RHEL 6

I found SAP Note 1597355 which discusses the possible size of a LINUX OS swap file when SAP is installed. When I reviewed this file, it appears to be dated from July of 2011. My question(s) are these:
1.) Is there any newer guidance on this topic for cases when Oracle 11g may be used.
2.) According to Oracle, a swap file-size of 16GB is sufficient if the allocated RAM is 16GB or more.

My situation is I'll have RHEL 6 VM's of 64, 96, & 128 GB RAM. If I went by what's in SAP Note 1597355 I'd need to reserve an OS Swap resource of ~100GB for each VM. If I followed Oracle, I'd only allocate 16GB of Swap per VM (a savings of 84GB per VM which is not trivial over 10's or hundreds of VM's). Any advice on this topic would be great.

Answer:
As I see that you have enough RAM configured for each VM. Technically Swap space will be utilized only when RAM is not sufficient. So initially you may configure a lower value say 20GB which is good to start on Unix environments.
Later based on system utilization you may evaluate and increase swap space if required.
If I not mistaken, if you go thru the installation guide, the min of 20GB swap space should be safe. In our environment, we would just set 20GB swap space as standard practice, and never encounter any swap issue.
Also, as per note 1597355:
"Customers may decide to use more or less swap-space based on their individual system configuration and their own experience during the day-to-day usage of a system."
 
 
How much swap space should be configured for SAP HANA hosts?

It is recommended to configure a small swap space in order to avoid performance regressions at times of high memory utilization on operating system side. Instead it is usually better if activities are terminated with "out of memory" errors. This makes sure that the overall system is still usable and only certain requests are terminated. A good value for the swap space is 2 GB (see e.g. SAP Note 1944799 for SLES environments).

SAP BC Tips

Get help regarding your Basis problems
Do you have a SAP Basis Question?

SAP Basis Admin Books
SAP System Administration, Security, Authorization, ALE, Performance Tuning Reference Books

SAP Basis Tips
SAP BC Tips and Basis Components

Administration In SAP - Sapgui, Unix, SAP ITS, Router, Client Copy and IDES 

Main Index
SAP ERP Modules, Basis, ABAP and Other IMG Stuff

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG. 
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk. 
 The content on this site may not be reproduced or redistributed without the express written permission of 
www.erpgreat.com or the content authors.