on 10-20-2015 3:47 PM
HI,
I have a few questions regarding memory management in SAP system.
I read about it a lot butI still confused
My question is:
1. How I know how much memory all the WPs is used? (How much memory all the WPtakesfrom the OS)
2. How I know how much memory all the DIA's is used? (How much memory all the DIAtakesfrom the OS)
Idontwantseperateit to extend memory roll areaetc, I want to know percentage of memory all the WP takes from the OS.
I asked it becauseineed to increase the number of DIA in the APO system, but before the change I want to know how much memory the WP and the DIA used now, I want to avoid frommemory problemin the OS afteriincrease the number of DIA.
My server is always around 80% memory used, but I limit the memory used bySAP systemwith the parameter PHYS_MEMSIZE, and Idontthink the SAP takes all the PHYS_MEMSIZE parameter value.
And it'stakeme to the 3 question:
3.howI know how much memory the SAP system takes fromOS? I limit the memory used by SAP with PHYS_MEMSIZE, but I want to know exactly how much memory the SAP takes and if he used all the valueigive in the PHYS_MEMSIZE.
Maybe Idontneed to increase memory in the server just to increase the number of DIA
Thanks for your help my freinds
Naor
HI.
First Iwant to thanks for your help
So if I understandcorrect thereis no way to know what is exactly the used memory of the WP\DIA?
And what about the all SAP memory?
I ask you another question.
Let's say you need to increase DIA in your sap system. whatdo you check before you do it, from the memory side, to be sure you will not have memory issue.
Thanks Naor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Naor,
Answers are below
So if I understandcorrect thereis no way to know what is exactly the used memory of the WP\DIA?
- Yes, at startup wps allocates some memory but it is neglectable when wp is in wait status. Whenever a user runs an activity on that wp it allocates memory from extended memory with a limit roll_extension. When it finishes it uses heap memory to a limit also.
You can chek below links
Memory Management: Basic Concepts - Architecture of the VM Container - SAP Library
Virtual Address Space of a Work Process - SAP Memory Management (BC-CST-MM) - SAP Library
SAP Memory Management (BC-CST-MM) - SAP Library
Allocating Memory for User Contexts (UNIX) - SAP Memory Management (BC-CST-MM) - SAP Library
And what about the all SAP memory?
Use the formula to find total SAP memory usage. I add screenshot of ST02.
I ask you another question.
Let's say you need to increase DIA in your sap system. whatdo you check before you do it, from the memory side, to be sure you will not have memory issue.
In this situation if you donot change memory parameters total SAP memory usage will not change. Or change is neglactable. Very small. All wps will use extended memory. If it is exhausted you will get memory dumps. And some programs will use HEAP area till limit also.
Increase #of wps and monitor your system from ST02 and ST22. Check PHSY_MEMSIZE parameter if you increased host memory. On windows this parameter is automatically set by SAP so you can check zero memory management note for windows.
Regards,
Yuksel AKCINAR
Hello Naor,
Use this formula. There are minuses as well.
Total Memory Used by SAP & DB =
DB memory (rule of thumb 1/3 of Host memory) +
(Total Alloc KB in ST02 – Total Freesp. KB in ST02) +
Roll Area Max Use in ST02 second table +
Page Area Max Use in ST02 second table +
Extended Mem Max Use in ST02 second table +
Heap Memory Max Use in ST02 second table
Can you send your ST02 as screenshot and as text also. And current memory parameters. I will try to calculate it for you.
Regards,
Yuksel AKCINAR
If you increase the number of work processes for an instance then you should make sure there is enough memory on the machine and if not you should increase memory (RAM). Like Isaias said every process will need memory from the OS to exist. It is not just for SAP work processes, any process/activity running on a machine will need memory. As you have an Oracle database when you increase work process you should increase the processes and sessions parameter. This means you should consider memory for Oracle processes. The recommendation from SAP is to consider 250 MB per work process but I would say 250 MB is quite a lot and maybe SAP is suggesting it as a defensive strategy. I normally check the ST02 detailed analysis for information about memory used by each work process. The parameter PHYS_MEMSIZE will limit the memory to be used by the SAP system.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI
Buffer HitRatio % Alloc. KB Freesp. K
Nametab (NTAB)
Table definition 99.96 25,211 11,881
Field definition 100.00 125,861 73,304
Short NTAB 100.00 6,321 3,222
Initial records 98.74 37,345 29,911
program 99.92 1,800,000 686,254
CUA 99.97 13,000 1,179
Screen 99.98 19,532 1,757
Calendar 100.00 488 316
OTR 100.00 4,096 3,327
Tables
Generic Key 100.00 200,000 27,451
Single record 97.36 40,000 10,857
Export/import 98.46 75,000 10,907
Exp./ Imp. SHM 99.57 4,096 2,178
SAP Memory Curr.Use % CurUse[KB] MaxUse[KB]
Roll area 1.21 3,175 11,784
Page area 0.45 1,183 262,136
Extended memory 2.72 913,408 6,385,664
Heap memory 0 2,244,228
PHYS_MEMSIZE 25600
total memory - 32 GB
Oracle - 17 GB
Thanks
naor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Naor,
First of all your DB has more than 1/3 of host memory rule value. As I said rule of thumb it should be about 10-12 GB. Check Oracle memory usages also. Does Oracle use all allocated memory?
PHYS_MEMSIZE + DB MEM SIZE = 25 + 17 = 42 GB. Your system must swap at least 10 GB from these values.
What about the swap size of your system? Is it 2-3 times of your host memory?
I will do calculations later. No time now. And reply later.
Regards,
Yuksel AKCINAR
Hello Naor,
As you may know ST02 Tx is the place where you need to check about memory usage in SAP instance.
Let me try to explain the topic with some parameters and formulas;
Here is the total memory usage for an SAP System including DB. Maximum usage of the memory can be found using this formula.
Total Memory Used by SAP & DB =
DB memory (rule of thumb 1/3 of Host memory) +
(Total Alloc KB in ST02 – Total Freesp. KB in ST02) +
Roll Area Max Use in ST02 second table +
Page Area Max Use in ST02 second table +
Extended Mem Max Use in ST02 second table +
Heap Memory Max Use in ST02 second table
You cannot calculate the max usage of memory using dia or non-dia wps count because all wps use a shared extended memory. There are parameters to limit the usages of this extended memory for each wp like ztta/roll_extension. You can check the usage and allocation of these parameters in ST02 transaction.
SAP keeps local memory of each wps very small in order all wps to use shared memory. For performance and usage reasons.
One more thing that needs care is;
Under normal conditions heap area usage is not accepted. If a wp is using heap memory it means it is in PRIV mode. And using unshared memory area. This is not wanted. This is limited with abap/heap_area_total parameter.
You can check below link for a presentation.
Regards,
Yuksel AKCINAR
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Naor,
Each work proess will use some memory just to "exist" in the system (something around 100MB - 200MB, depending on the SAP kernel release in use).
Besides that, I believe you can use the sappfpar output to have an idea of how much memory SAP will use.
You can execute this tool at operating system level (notice that the "pf=..." argument has to be adjusted):
sappfpar check pf=/usr/sap/SID/SYS/profile/instance_profile
Keep in mind that sappfpar will not account the "heap memory" (parameter "abap/heap_area_total").
The heap memory is allocated and freed dynamically, as the system needs.
Regards,
Isaías
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.