cancel
Showing results for 
Search instead for 
Did you mean: 

disp+work and Memory

Former Member
0 Kudos

All,

<br>

This thread is a little similar to

Below is from my O/S when almost all my disp+work are idle (according to sm50):<br><br>

PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP<br>

9953 ep1adm 6346M 1336M sleep 1 0 2:34:16 0.0% disp+work/1<br>

16349 ep1adm 6366M 1295M sleep 1 0 3:29:37 0.3% disp+work/1<br>

17897 ep1adm 6366M 1291M sleep 50 0 3:31:48 0.0% disp+work/1<br>

11853 ep1adm 6334M 1291M sleep 6 0 1:45:36 0.0% disp+work/1<br>

11854 ep1adm 6326M 1229M sleep 1 0 1:17:33 0.0% disp+work/1<br>

11857 ep1adm 6302M 1213M sleep 59 0 0:07:33 0.0% disp+work/1<br>

12178 ep1adm 6306M 1212M sleep 54 0 0:15:21 0.0% disp+work/1<br>

10308 ep1adm 6293M 1186M sleep 1 0 0:02:17 0.0% disp+work/1<br>

12177 ep1adm 6302M 1182M sleep 48 0 0:07:37 0.0% disp+work/1<br>

11856 ep1adm 6529M 1178M sleep 1 0 0:16:25 0.0% disp+work/1<br>

11858 ep1adm 6298M 1155M sleep 59 0 0:04:34 0.0% disp+work/1<br>

15351 ep1adm 6317M 1138M sleep 1 0 0:13:04 0.0% disp+work/1<br>

17936 ep1adm 6309M 1129M sleep 40 0 0:03:32 0.0% disp+work/1<br>

20830 ep1adm 6321M 1097M sleep 10 0 0:07:36 0.0% disp+work/1<br>

25568 ep1adm 6301M 1034M sleep 41 0 0:00:19 0.0% disp+work/1<br>

12182 ep1adm 6284M 987M sleep 1 0 0:00:08 0.0% disp+work/1<br>

12180 ep1adm 6288M 985M sleep 1 0 0:03:29 0.0% disp+work/1<br>

12183 ep1adm 6284M 978M sleep 1 0 0:00:05 0.0% disp+work/1<br>

12181 ep1adm 6284M 974M sleep 47 0 0:00:23 0.0% disp+work/1<br>

12190 ep1adm 6280M 866M sleep 59 0 0:00:15 0.0% disp+work/1<br>

12191 ep1adm 6280M 861M sleep 54 0 0:00:04 0.0% disp+work/1<br>

26238 ep1adm 6309M 842M sleep 1 0 0:07:39 0.0% disp+work/1<br>

12192 ep1adm 6276M 795M sleep 59 0 0:00:02 0.0% disp+work/1<br>

12189 ep1adm 6280M 769M sleep 1 0 0:03:41 0.0% disp+work/1<br>

12193 ep1adm 6276M 767M sleep 59 0 0:00:01 0.0% disp+work/1<br>

12188 ep1adm 6281M 724M sleep 59 0 0:01:30 0.0% disp+work/1<br>

11191 ep1adm 4692M 215M sleep 59 0 0:07:47 0.0% disp+work/1<br>

<br>

Here are our relevant parameters from RZ11:<br>

<br>

em/initial_size_MB = 4092 (about 4GB)<br>

ztta/roll_first = 1024 (1 KB)<br>

ztta/roll_area = 6500352 (6 MB)<br>

abap/heaplimit = 40894464 (39 MB)<br>

ztta/roll_extension_dia = 2751463424 (2.56 GB)<br>

ztta/roll_extension_nondia = 2751463424 (2.56 GB)<br>

abap/heap_area_dia = 2751463424 (2.56 GB)<br>

abap/heap_area_nondia = 2751463424 (2.56 GB)<br>

<br>

I understand the SIZE field being as large as it is. I attribute this to our Extended memory being set to approx. GB (em/initial_size_MB). I understand that a good part of this memory is Shared Memory because of the extended memory.<br>

<br>

What has me a bit puzzled is the RSS size (which I understand is non-shared). As you can see, most of our processes have an RSS in excess/around 1 GB. I could attribute this 1 GB to "Private Heap Memory"; however, I understand that if a process' private memory exceeds 39 MB (abap/heaplimit) it should get restarted when its context is clear and nothing is running on it.<br>

<br>

<br>

So my question is:<br>

<br>

<b>What is using up this 215 MB-1366 MB if the system is in a still state? If what's using up the memory is "Private Heap" then why isn't the process getting restarted to reclaim the memory if it is over 39 MB?</b><br>

<br>

It's late in the day and I hope the question makes sense, I'm just struggling to understand why each disp+work has such a big RSS.<br>

<br>

Best wishes....<br>

Phillip Hofmeister<br>

Accepted Solutions (1)

Accepted Solutions (1)

former_member524429
Active Contributor
0 Kudos

Hi,

What is using up this 215 MB-1366 MB if the system is in a still state?
 If what's using up the memory is "Private Heap" then why isn't the process 
getting restarted to reclaim the memory if it is over 39 MB?

On most systems, when dynamically allocated memory is freed, it does NOT actually return it to the OS, but rather simply keeps it around but marked as free, so that if future dynamic memory allocation is required by the process , it can grab the memory from that pool of freed memory, rather than having to ask the OS for more again and again.

Some shared memory areas are also included in the RSS size count. If you do total of RSS size of all work processes, it may come more than your existing Physical RAM.

If what's using up the memory is "Private Heap" then why isn't the process 
getting restarted to reclaim the memory if it is over 39 MB?

In Non-UNIX type OS, OWhen Work Processes start the usage of single Byte of Heap Memory, it will enter in "Private Mode". And then that memory exclusively locked for that work-process only. upon completion of Transaction the Work Process will automatically release that used Heal Memory.

But in Unix type OS, allocated swap space is not freed by OS automatically. So when the limit set in abap/heaplimit is reached the work process is flagged for Automatic restart. If the heap memory consumption of a work processes exceeds abap/heaplimit, then after ending the transaction, the heap memory is automatically released and the

work process restarted to release the swap space.

Regads,

Bhavik G. Shroff

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

1) Memory usage in linux (ps) and unix (svmon) environment is complex and there is NO WAY to find out the memory used by a single process.

The problem is because they use shared libraries to facilitate certain functionality.

So memory which ps and svmon gives will be accurate for a process if that is the only process running but when there are several process then then rss,vsz,virtual values are not correct and as bhavik mentioned .. if you total the value will be a lot more than the physical memory on the machine.

There are links which you can find to compare process maps between processes to roughly calculate close to the memory a process will actually use but is not very easy.

For memory trouble shooting , look at the global usage which will indicate the memory on the box ... and then top memory users and go from there.

2) Discussing the size of memory above .. is that the only reason you say the process is using priv memory ? Or do u see this in sm51 ? If not the latter then you will not hit the heaplimit and wp wont b restarted which i think is in ur case.

Hope this helps

Laxmi

Former Member
0 Kudos

Dear Sirs,

Thank you for your replies. I have loo0ked at SM04/Goto/Memory. This report indicates none of the logged in users are using private memory, it is a very useful report in general.

I was just trying to provide an explanation to my project director on how the memory space on our box is being used and why we are using so much swap space.

I have suggested that in order to reduce our swap usage we reduce the number of disp+work processes we have on that instance.

former_member524429
Active Contributor
0 Kudos

Hi,

in order to reduce our swap usage we reduce the number of disp+work processes we have on that instance

It all depends on the Usage of SAP System such as concurrent SAP User access, Workload on Peak time and availability of all H/W resources during Peak Workload, etc.

You will have to analyze the system performance during Peak Work Load of Week/Month/Year and then according to the requirement you will have to optimize the performance factors at SAP System Level, at DB Level and also at OS Level. Remember it "Performance Optimization is on-going process".

Regards,

Bhavik G. Shroff