cancel
Showing results for 
Search instead for 
Did you mean: 

How to quantify memory usage of an ABAP instance via Linux commands

ulrich_sander
Explorer
0 Kudos

Hi all,

I wanted to find out how much memory is allocated by a certain ABAP instance. I made the total of

ps -edalf | grep <sid>adm | tr -s " " | cut -f10 -d" " and 

ipcs -m | grep <sid>adm | tra -s " " | cut -f5 -d" "

but the result of this calculation is much below the real consumption. What is missing?

 

Rgds

Ulrich

View Entire Topic
chico_zhu
Advisor
Advisor
0 Kudos

Hello 

You can simply use "top -b -n1" output, looking at column VIRT for SAP work processes. The top 1 process represents the overall current SAP ABAP instance usage since work processes sharing the same extended memory area. This may contain some additional heap memory consumption though. 

From R3 ABAP session, you can use t-code st02 to have this info:

st02 -> detail analysis menu ->storage button. The field "Virtual memory allocated *TOTAL*"

ulrich_sander
Explorer
0 Kudos
Hi chico_zhu,
ulrich_sander
Explorer
0 Kudos
Your solution is a little bit like the "ps -edalf" that I had already tried. If I understood you right only one work process should be counted. But the whole instance is consuming 140GB and one work process has only 0,106t.
chico_zhu
Advisor
Advisor
0 Kudos
Hello, where did you get the 140G calculation? What's the R3 level st02 field "Virtual memory allocated *TOTAL*" value? The mentioned trick displays only SAP work process total consumption from PAS/AAS instance and not counting ASCS instance and other minor components in. Executable sappfpar provides some more calculations on a worst scenario SAP memory usage. You can refer to this help sap page: https://help.sap.com/docs/SUPPORT_CONTENT/si/3362958716.html
ulrich_sander
Explorer
0 Kudos
Hi chico_zhu, I got the total by the command "free -h". In this case this is possible because only one ABAP system is running on that server. The value is currently 127GB. So forget about the 140GB I'd written before. I've checkd the "sappfpar check" this also is interessing. I had seen the worstcase memory consumption is 184GB. So even higher than the current usage. Even the minimum total there is 163GB. Stragne that we are currently below the minmum.
chico_zhu
Advisor
Advisor
0 Kudos
The previous discussion applies to only SAP ABAP DIA or known as PAS/AAS processes memory calculation. Additional memory consumption from other SAP components are not included for example ASCS instance, DAA agent, GW related and additional heap memory if used. Also when you expect the "only application" SAP to account for every KB of used memory it is not true. OS kernel and house keeping processes will consume some free memory for example pagetable. sapfpar counts also heap memory into the calculation that's why you got huge amount but didn't actually happen (yet). For sizing and planning, I would advise to check from R3 previously mentioned ST02 view.