So today we are going to discuss about the SAP memory management. So why memory management? Sir what is memory management? What is memory? So in the system if you see here in the system we go to the SM04 or AL08 each and every process which has using the some amount of memory some amount of memory it is using right.
in the system each and every process it is using the some amount of memory in the system here right so also if you go to the sm50 each work process see here the work process status here so we have the work processor running status here but each work process it will use the some amount of cpu and some amount of memory here some amount of memory it will use it here so how for us food and water is very important. Here also our work process CPU and memory is that much of important for us. For us if you don't have food, water for one day or few hours then how we will go slowly 6 status.
Here also the work process will go to the so 6 status. The 6 status here the status is called the here it will add to the six status here here it will it will go to the private mode private memory private mode it will go to the private memory here private memory means when work process does not have sufficient memory there is a memory allocation for the each and every work process here there is a memory allocation for the each and every work process here so depend on the depending on the work process type either we have the two types of work types of work process dialogue and non-dialogue for dialogue means dialogue process non-dialogue means so we have the background update spool non-dialogue means these are called the so non-dialogue work process so btc right update update and spool these are the so non-dialogue process dialogue means only dialogue process here so there is a allocation depending on the work process type these are the types okay these are the types of work process here depending upon the type depending upon the operating system we have the memory allocation sap memory management decide the sequence The sequence will be followed here. There is a sequence. Sequence means order. So, depends upon the work process type, depending upon the underlying operating system, the SAP memory management decide the sequence in which work process allocate the which memory.
So, which memory. So, that will be allocated here. So, here we have. So, the sequence we have extended memory.
Private memory. So in order to cross your request, we have the sequence of memory areas is there. The first memory is called the local memory.
Then extended memory. Right. Extended memory.
Then we have the priv mode. Priv mode. Private memory which is called the heap memory.
This is called the heap memory. So private memory is called the heap memory. heat memory.
So these are the memory sequence, memory sequence here. So basically first it will use the allocated memory. This is not sufficient. Then it will take the memory from the extended memory.
This is also not sufficient. Then it will take the memory from the heat. Heat means private mode.
So then when it goes to the private mode, then work process goes to the private mode, private mode. When the workup process goes to the preview mode means one of the guarantee important question. So, private mode.
When the workup process does not have sufficient memory, that time it will go to the private mode. That time it will go to the private mode. A suitable memory allocation, it will, a suitable memory will be allocated. So, each and every resource.
some amount of memory will be allocated for the smooth operations and high performance. for smooth operations and high performance each and every work process when the user joins it will allocate the some amount of memory and cpu okay so why because for the smoother execution and process if you don't have much memory then work process will go to the die status it will go die status here so normally each and every work we have the types of work process right we have the r types of work process here so dialogue and non-dialogue here so when it comes to the dialogue when it maybe let me take one diagram here yeah one table i will let me insert one table here so you can easily understand you can easily understand the so all those things here so here dialogue non-dialogue windows non-windows perfect Right. Just excuse for the diagrammatics. I am poor at diagram.
So, these are the work process types here. This is the dialogue work process, right? So, these are the non-dialogue work process.
Non, so dialogue work process here. Dialogue and non-dialogue work process here. so dialog work process this is the type work process type here so and also this we will call it as the windows windows then windows operating system and this is we will call it as the unix and linux operating systems right so windows and linux operating systems here so dialogue dialogue in the dialogue process it will behave either windows or non-windows it will behave the same the behavior means the allocation of the memory is the same here the allocation of the the memory allocation is same here the first it will go to the extended memory extended memory extended so memory extended memory then then after that then it will go to the preview mode private mode it will go to the private mode here Private memory. Same as like, same applicable for the, here also, then first it will go to the extended memory, extended memory.
Then, then it will go to the private memory, private memory. Private memory means keep memory we have. So, for dialogue work process, either the windows or non-windows, any operating system, the behavior is neutral.
The behavior is common behavior. First it will use the extended memory then private memory. So sequence it will follow extended memory then private memory here.
So when it comes to the when it comes to the non-dialogue work process, slightly it is a reverse order. First it will use the non-dialogue means bad job. First it will use the private memory then it will go to the so heap memory. Heap memory means extended for extended memory em. extended memory here.
So, then it will go to the extended memory first, right? So, then here also, it is the same. It is the same here, extended memory.
Then the next one, it will go to the private mode, private mode here. So, by seeing this table, each work process, the dialog work process, first it will consume the, first it will allocate the local memory, local memory, local memory here. right the local memory here the allocation is first is the local memory here all the work process all process will allocate the some amount of memory that is called the local memory or called the role area role area we will call it as the role area here so dialogue process the allocation is same first of all it will use the extended memory extended memory so extended memory first it will So, when the local memory is not sufficient, then. Someone not saying something. No, right.
Okay. So, then, so, okay. So, initially, initially, each work process, initially, each work process, each work process.
there is a role area role area will be defined local memory means roll memory roll this is one more name is called the roll memory roll area roll area so roll area in the roll area So, role area, that is the, initially, it is reserved, it is reserved some memory is called the role area. In that role area, there is a role underscore first memory, it will allocate it. Role underscore first memory, it will allocate it. So, that some amount of memory will be allocated here in the, for the local here.
So, local means it's a role area. So, some amount of memory will be allocated here. So, in that, so. This is not sufficient.
Suppose example for simply understanding purpose, in your plate, in your food plate, you have, so you have some quantity, one bowl of food is arranged to you. That is your daily food. Okay? So that food is called the, that food is called the, so role underscore, first role, role memory. That is called the role memory.
Okay? In that role memory, that food is not sufficient that day. One day, every day only one small quantity of cup of bowl they are arranging to you as a lunch. So, that is not sufficient for you. Then what you will do?
If it is not sufficient, then immediately you will go to the, immediately you will take the some amount of food from the other bowl. That is called the extended memory. This is also not sufficient for you. Then immediately it will take the one more memory. This is called the main bowl.
This is called the private mode here. Then immediately you will go to the kitchen. You will take all the bowl and everything. You can take it out. So this is the maximum memory here.
This way. Initially, every day some amount of memory is allocated. This is reserved.
This reserved food is not sufficient. Then what you will look for? You will order the one more biryani packet, right? You will order the one more biryani.
So, that day you are very hungry, you are also not much, you are very hungry, you need some amount of memory, then you will directly go to, you will order the one more family pack, that family pack is called the private memory. So, this way the work process will take the memory sequence wise. First role, role memory, then role underscore, role memory, then extended memory, then private memory. So, The local memory is called the role memory. Then extended memory.
Then private memory. Like that, the sequence wise it will take the memory. For dialogue, either windows or non-windows, it is same. Either windows or non-windows, it is same.
But for non-dialogue work process, for non-dialogue work process, so it is the different here. Non-dialogue work process, it is the differently it will use it here. Only...
for windows for the non-dialog first it will use the private mode then it will go to the extended memory sir i want to control i want to control the this para memory i want to know the all the memory parameters and everything here so how can i control sir how much amount of memory allocated in this bone as i told in this bowl small quantity of food is ordered then what is that small quantity how can i control it what is the bound size? Bound means we have 500 grams, 600, so 1000, like that grams are there. Sir, how can I control that bound food here? So, there are the memory parameters in SAP level.
So, memory parameters which will control the, so your all level memory areas, that memory parameters comes with the here, JTTA, the role underscore first. Then, JTTA slash role underscore area. Then, JTTA the role underscore, role underscore extension, extended. Okay.
Role underscore extended memory. That is the role underscore first. Then, role underscore extension. Role underscore extension. Daya.
Extension. Extension. underscore dia so right and non dia zeta roll underscore dia underscore non dia why because dialog process is different nine dog yellow cross it is different right so then then it will go to the it will go to the next one is called the above slide these are the memory parameters remember these are the above memory parameters it's a very very important it's a very very important parameters then heap limit abb and keep underscore area underscore dia then above slash heap underscore area underscore non dia non dia so these are the memory parameters dia means this heap memory for the private memory from the dialog work process non dia means non dialog work process heap limit total limit total equals to this plus this right so here also role underscore extension so role underscore extension dia and non dia also and non-dia also we have the memory parameters are there here memory parameters are there so where can we change the memory parameters where can we change where can we change the normal profile parameters and everything where can we change what is the transaction code excellent excellent excellent okay here we will change the parameters right there is some amount of suppose example if you go here so the so role underscore go to the rj10 so here we can go to the here instance profile extended maintenance go to the display change mode okay here jtta slash so role underscore area role underscore area so role underscore area here so this parameter this parameter so we'll we have to provide the value here we have to provide the value here but currently so this is the old method these are the old method here these are someone changed the all those things here all up see here they have dialogue 20 biotc and also update update 20 what is the use of the update 20 you make it here it should be some naming convention right see here wrongly they have updated if you update very wrongly system it won't start when you restart it why because that lack of the memory here so here lack of the memory if you keep on increasing the parameters it won't stop it won't start why because lack of memory memory here that's why here we can see memory which means each and every process it will occupy this some amount of memory so if you keep on increasing the processor 100 200 20 30 there is no use but unnecessarily memory usage system it won't go it won't start so that's why so don't change parameter unnecessarily until you have a genuine reason okay genuine reason so you have to change this one so this is the allocations memory allocations for the param these are the memory parameters here above heap area dia non-dia heat limit so these are the memory parameters here so these parameters will control the the memory allocations here memory allocations means your ram memory so you have the ram RAM memory is there up to, you have the RAM is there up to 21 GB. So, this 21 GB will be used here, SAP or DB.
How much DB has to use it? How much SAP has to use it? So, this coordinately shared memory, how much it is used it here? So, this memory parameters will control the allocations here.
This memory parameters will control this allocation. But currently, so, But I think nowadays in the latest kernels, these parameters are not useful here. So we have the one parameter.
There is a ZMM, zero memory management. There is a concept came into the picture. Which means, so you don't need to set all these parameters manually. There is one parameter here, PHYS underscore memsize.
Remember this parameter, PHYS memsize. If you set 4GB. your sap will use only 4gb if you set 8gb your sap will use only 8gb here so this parameter will control the entire your above system entire your system memory here no one will change there is a memory parameters how much 21gb 21gb i have allocated right so now if i change this memory to the 10 gb then sap will use only 10 gb of memory here so this memory this parameter is the very very very important here only this parameter will control the entire memory management here entire memory management this parameter will control here so how much it has to use it all those things it will use by the this parameter here right so that is the that is the memory management so remember each and every the first the allocation how it will happen role role first then remaining role area then extended memory Then private memory. Like that, the allocation will happen to the, the allocation will happen to the, so this allocation happens to the work process here. So, when the work process goes to the private mode, that is one of the question here.
When the work process does not have enough memory in the extended store, extended memory, then it will go to the private mode. Right? First, it will go to the role, extended.
REP like that you can remember okay. REP roll memory, extended memory, private memory here. So where can we see means in ST02 here we can see the memory areas here right.
So extended memory and heap memory. This will be the the roll will roll will not be it will not be displayed here. Why because that is the reserved. So it will not display here.
But it will show the extended memory. and heap memory here extended memory heap memory here so when the work process okay this is fine but when the work processor started using the private memory means it's a dangerous situation of the your ass dangerous situation of the system here dangerous situation of the your sap system here why because it is using the private mode means it is using the operating system memory then anytime any minute it will go down so that's the dangerous situation here so normally one user will start executing the report so when that started reporting executing that initially it will use the 2vb then after one hour two point after one hour three after one or three point five four like that hours is increasing the memory also will consume increasing increasing increasing at a particular time when it will go to the private mode anytime your operating system memory is the 8 GB only it's already 7 7 GB it's already used you have only 1 GB is left then then any time any minute any hour it will go down immediately it will go down so that's the reason the time when the work process go to private mode means it's already using the private memory private memory then heat memory then you are in the dangerous situation your system is in the dangerous situation anytime your sb system will go down so To avoid this one, first of all, we need to check what is the user. We go to the AL08. What is the user which is consuming the most of the memory?
Oh, he is a user from 000 DDS user. He is consuming this much of memory. Now, it is very less. But sometimes, GBs of data, it will be used here. GBs of data, it will use it here.
So, then it is a dangerous situation. Then immediately, we need to ask this user to log off or fortunately, we have to kill that processor. we have to do why because because of one user entire system is going to down during the business hours it's a very bad right so that is the reason we have to instruct that user to don't do anything in the dialogue mode so you have to anything if you want to do you can do in the bag non-dialog mode why because in the non-dialog mode we have the nothing will happen in the non-dialog mode why because it will run in the non-dialog mode so it won't happen nothing nothing there is no memory stores So, when the work process go to private main user, it keep on running something in the dialog mode that something is started running, running, running, running, running.
So, finally, it will go to the final status, then it will go down status here. So, when the work process are in the private mode, so there is a red alarm, red alert. So, we have to carefully, we have to plan here red alarm and red alerts here, then it will use it here.
So here, if I go a little bit deep, if I tell the role, if I go role, so role memory, role area, what is mean by extended area, what is mean by private mode. So I say role area is the memory that is the, that will say size of the each work process that's located in the heap. So that is located the size of the work process here.
So, initially each and every work process some amount of memory is allocated. As I told in the bowl concept, some amount of bowl, one quantity of football, it is allocated to you. so that is the memory here then it will go to the extended memory is the core of the memory management edge which means each sap work process has reserved this some so some some amount of memory for the extended memory maybe you will get confused don't get confused you can ignore it in deep concept you will get confused so you can remember only one thing here there are the three memory areas role extended private mode if the role is not sufficient then go to the e is also not sufficient then you will go to the p then go to the p here right so when it go to the p means it's a red alarm red alarm red alarm means it's a dangerous status then it's using the operating system memory all the virtual memory it is using your ram memory is using then it's a a dangerous situation so immediately we need to kill that process which process consuming in the work process so all those things we have to perform it in the nasa p memory management concept here okay this is a small concept theoretical concept just to remember this is the very important remember this table structure this is the very important how the allocation happens these are two questions they may ask you how the memory allocation will happens to the dialogue work process and non-dialogue work process right what is the sequence role extended private mode when the work process goes to the private mode when that when when it will go to the p when e is not sufficient then it will go to the p right when the single single plate small bowl is not efficient then it will go to the full pack that full pack also not sufficient then it will go to the the main pack it will go to the kitchen and it will grab all those things right so this is the kitchen kind of kitchens right so this is the allocation r e p you can remember this word so here windows and the linux is the same for dialogue same for non-dialogue it is the different procedure that you can remember take a note of these things okay it's a very very very important concept got it don't don't go deeply you will get why because it's a confusing topic so just remember the questions and answers whatever i am explaining only that is sufficient for you for now you don't require those things all those things you will get more confusion then it will create some noise so don't don't go deeply that's enough eye level that is enough for you okay okay but when it goes preview mode so what we need to do sir so when it is going in the private mode private mode means maybe some report some user is doing something in the system okay now let's find out who is going okay now it is fine so now it is fine first of all private mode means you will get the symptoms as part of the daily monitoring you will go to the sm50 or sm66 then we will see here you will see here so what is the workbook process which is in the private mode so here nothing is there okay fine sometimes what happens i am the user i'm continuously running running running i'm executing some report maybe let me take here i will execute the one report here okay not this one this will be the end it represents this one okay i'm executing in the dialog mode here dialog mode i am executing so not in the dialog mode i'm executing here i'm executing now okay so let's see here it will take longer duration it will take longer duration Now after one hour or two hour system will go die.
Let's see here. Just go to the here SM04. I am running.
I am running the one report here. So what is this? What happened?
Someone changed something. What is this? Someone playing something with the system.
text is not described here someone some something they have changed here let me take the signature thing here let me close close on this it won't go straight let me stop okay now it's perfectly fine someone changed the theme so it created the noise okay so that is fine so what i am doing here so here there is a sizing report i am executing in the dialog mode okay dialog mode i am executing people normally what they will do to finish quickly they will execute in the dialog mode okay i am executing in the dialog mode so okay that is fine it will run more than hours actually this report will run more than hours here see here this report will run more than hours so this is running now this report will run more than hours see here this is running now sequential read this is running right so this is running it will take the longer duration now it is using the cpu memory so maybe if you want to see in sm04 you can see the the user utilization also you can see here see here how much memory so how much it is using all the it will get it will collect the memory now so it will it will grab the all the memory now okay all the memory still but even though it won't display here okay one time it is fine now one hour this is fine then two hours then after three hours after four hours then immediately when the work process does not have much memory so this one this is running now right i'm running the one report in the one session this is running now after few minutes after few hours this workflow status will go to the private mode why because this will start using the heat memory role memory then heat memory then private memory when it started using the private memory means it will go to the private mode how can i know whether it is using the private memory or not so here it will go to the preview mode preview mode preview mode means it started using a private mode oh very dangerous situation then check this work process here who is the user so what is the client then what is running here right what is the current action from the different action here right so with this user who is this user what is running here let's go to the so let's take the username means you will get the email then send an email or ping that user or go to the your sm04 here see what what exactly is running here so all the information you will get from here all that information you will get how much memory allocations in memory so all the information you will get from here right so based on that based on that you see above report is running here right just examine the session here every above report is running here i say 38 you are running the one report so this is consuming the most of the memory here see here now 98 refresh refresh so then finally it will go to the then finally it will go to the so private mode here none of you know why because this will consume the lot of memory lot of data then when it go to the private memory sometimes system will go down state of also then immediately we need to cancel what we have to do means first analyze it what is running we will go to the sessions and suppose if you select this one go to the sessions we will find out he is executing one report is executing fine okay one report is executing that is fine so what is the user now we got the username ping him ask him to so close the session and run in the dialog background mode so don't run anything in the dialog mode if you run in the dialog mode it will create the nuisance so we have to run in the btc mode background mode we have to execute it this is what we need to do kill the work process or cancel the session go to the how to cancel the sessions then go to the sm04 you can do it or sm12 just go to the sm12 here then check the client so here check the any logs no sm04 go to the sm04 check the sessions what is the session is running sm50 kill the work process cancel the work process so that others will save otherwise everyone will be knocked out from the system logout from the system that is what will happen here So private mode means it's a dangerous zone here. Then system is entered into the dangerous zone. We need to save that.
We need to bring back from the dangerous zone here. That is what we have to do. Okay.
That is what we have to do it here. So we need to check why only maybe in the dialogue mode that some few people they will run in the dialogue mode, some reports, some programs, some executions they will do in the dialogue mode. So that time it will use the lot of memory and everything.
Yeah. okay just theoretical theoretical so just stopping here just to remember the that allocation that's it you don't need to so only we need to feel that the user only sir yeah we need to stop we need to ask them to stop it run in that background mode as a job we have he has to run it not in the dialogue mode we have to run it now if you run in the dialogue mode definitely say that is not the you have to say as per sap recommendation any program or any execution which is running it which will run longer time you have to run in the as a background mode not in the dialog mode if you run in the dialog mode system will throw the doms it will create the so private mode system will go down one because of one user system is going to down because of one user the number of users are getting impacted so better to cancel that work processor cancel that user or kill that user from the system so whatever is there 20 21 gb in your system only that right