<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Huge memory allocation in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/huge-memory-allocation/qaa-p/6711490#M2439338</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt; I found the parameter sap rdisp / wp_auto_restart = 0. If I change parameter rdisp / wp_auto_restart to 2h to say, do you think would be able to solve this problem?&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Mar 2010 07:47:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-09T07:47:44Z</dc:date>
    <item>
      <title>Huge memory allocation</title>
      <link>https://community.sap.com/t5/technology-q-a/huge-memory-allocation/qaq-p/6711489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Heloo guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following system: Linux SLES 10 (x86_64) / Oracle 10.2.0.4.0 - RAC / SAP ECC 6.0 Kernel Patch 221&lt;/P&gt;&lt;P&gt;Memory in the system reported by the utility "top" is 39116504k.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Considering that the memory used by Oracle is determined by the formula 1 * SGA + sum (PGA) i have executed the following select: "select (sga+pga)/1024/1024 as "sga_pga" from  (select sum(value) sga from v$sga),(select sum(PGA_ALLOC_MEM) pga from v$process)"  and the result was : 15642.2719268799&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About the memory occupied by SAP I looked at the parameter em/initial_size_MB = 8000.  Where in transaction st02 to "SAP Memory" - "Extended Memory" I have&lt;/P&gt;&lt;P&gt;"In Mem[KB]"= 8.187.904,&lt;/P&gt;&lt;P&gt; "MaxUse[KB]" = 4.558.848, &lt;/P&gt;&lt;P&gt;"CurUse[KB]"= 2.768.896&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So let's say that for SAP and Oracle i have 8000 MB + 15643 MB = 23643 MB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But utility top and utility free  reports the same thing=&amp;gt;&lt;/P&gt;&lt;P&gt;        Mem: total=39116504  used=38806160 free=310344 &lt;/P&gt;&lt;P&gt;and Swap: total=20972848 used=601552 free=20371296&lt;/P&gt;&lt;P&gt;I looked on top in a sort after Memory Usage:&lt;/P&gt;&lt;P&gt;  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND&lt;/P&gt;&lt;P&gt;20021 oraprd    16   0 14.9g  12g  12g D    8 34.4 206:37.97 oracle&lt;/P&gt;&lt;P&gt;19896 oraprd    16   0 14.6g  12g  12g S   14 33.7 226:08.87 oracle&lt;/P&gt;&lt;P&gt;19894 oraprd    16   0 14.4g  12g  12g D    3 33.4 265:10.75 oracle&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;And the list of processes that uses over 30% of memory is much longer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Honestly, 30% from memory used (about 11.4 Gb / session) seems to me very much!&lt;/P&gt;&lt;P&gt;Consequently I took a look in transaction st04  "Session Monitor"and we have identified (by PID)&lt;/P&gt;&lt;P&gt;first session of the top , as a session with inactive status. We also identified the number of Workprocess and noticed that it does not run anything in transaction sm50. I checked in sm21 and st22, for an error that give me an idea, but nothing.&lt;/P&gt;&lt;P&gt;I also noticed that if I go to sm50 and give "Cancel with core" in the process, the process restarts and memory-level operating system is released.&lt;/P&gt;&lt;P&gt;So, I guess, I have a memory issue, ... but not sure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can help me someone to understand what is happening there and why this happens?&lt;/P&gt;&lt;P&gt;Can i ? and how to put a limit for memory allocation for process, then that process to restart automatically to release the memory?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot,&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Mar 2010 09:04:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/huge-memory-allocation/qaq-p/6711489</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-04T09:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: Huge memory allocation</title>
      <link>https://community.sap.com/t5/technology-q-a/huge-memory-allocation/qaa-p/6711490#M2439338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt; I found the parameter sap rdisp / wp_auto_restart = 0. If I change parameter rdisp / wp_auto_restart to 2h to say, do you think would be able to solve this problem?&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Mar 2010 07:47:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/huge-memory-allocation/qaa-p/6711490#M2439338</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-09T07:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: Huge memory allocation</title>
      <link>https://community.sap.com/t5/technology-q-a/huge-memory-allocation/qaa-p/6711491#M2439339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, this is quite complicated, let me give you another view first: you don't have a memory issue, unless you experience swapping. If that happens your system will be very slow, and you can see high disk activity and the kswapd processes using cpu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to know that linux does automatically use free memory as filesystem cache, so it is very common, that there is no free memory. Use the os command free to see the details:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;mho $ free
             total       used       free     shared    buffers     cached
Mem:      24522636   24436912      85724          0     513576    6683712
-/+ buffers/cache:   17239624    7283012
Swap:     49151984    1812044   47339940&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my example the whole 24gb are used, but approx. 7gb are filesystem cache, meaning technically free.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason you see a lot of processes using 30% of memory is, that they are using shared memory, so top does not show that correctly. The two big shared memories are the SAP extended memory (EM) and oracle SGA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Setting rdisp/wp_auto_restart will only free heap memory (process local) memory, but not the shared memory from the EM. We use a setting of 24h on some systems, personally i like it and there is practically no disadvantage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So remember if you don't experience high swapping resulting in huge system slowdowns, you don't have a memory issue yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Mar 2010 08:11:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/huge-memory-allocation/qaa-p/6711491#M2439339</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-09T08:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: Huge memory allocation</title>
      <link>https://community.sap.com/t5/technology-q-a/huge-memory-allocation/qaa-p/6711492#M2439340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;heloo mho,&lt;/P&gt;&lt;P&gt;Thanks, very useful information. Indeed, we have more free memory in cache.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;free -m&lt;/P&gt;&lt;P&gt;             total       used       free     shared    buffers     cached&lt;/P&gt;&lt;P&gt;Mem:         38199      37847        352          0        408      30280&lt;/P&gt;&lt;P&gt;-/+ buffers/cache:       7158      31041&lt;/P&gt;&lt;P&gt;Swap:        20481        161      20319&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, this car has done the swap, and everything moved slowly... but I have not watched if I had some free in the cache ... &lt;/P&gt;&lt;P&gt;Anyway I think I kinda understand, even for the most part, what happened to that memory load ... &lt;/P&gt;&lt;P&gt;But what you said about shared memory made me think. &lt;/P&gt;&lt;P&gt;My configuration is this: I have 2 machines, each has one sap instance and one Oracle instance ,with less RAM, which we defined em / initial_size_MB = 7000. we also have 2 other cars, each with an SAP instance,  with more memory,where we defined em/initial_size_MB = 52000.&lt;/P&gt;&lt;P&gt;So in total we have 4 instances: 2 instances with em/initial_size_MB = 7000 and 2 instances with em/initial_size_MB = 52000. &lt;/P&gt;&lt;P&gt;My problem is appeared on instances with em/initial_size_MB = 7000 where on OS level where we 38Gb RAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this situation,  em/initial_size_MB=52000 on the machine with more ram , may affect shared memory on the machine with less RAM?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Mar 2010 09:23:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/huge-memory-allocation/qaa-p/6711492#M2439340</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-09T09:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Huge memory allocation</title>
      <link>https://community.sap.com/t5/technology-q-a/huge-memory-allocation/qaa-p/6711493#M2439341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;In this situation, em/initial_size_MB=52000 on the machine with more ram , may affect shared memory on the machine with less RAM?&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Absolutely no, shared memory is not shared between different servers. So for example if you increase the EM on server1, this does not have an effect at all on server2. The memory is only shared for the work processes on server1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Mar 2010 09:52:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/huge-memory-allocation/qaa-p/6711493#M2439341</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-09T09:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: Huge memory allocation</title>
      <link>https://community.sap.com/t5/technology-q-a/huge-memory-allocation/qaa-p/6711494#M2439342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Thanks for the support provided. &lt;/P&gt;&lt;P&gt;We changed the parameter in the test and after careful monitoring will implement in production. &lt;/P&gt;&lt;P&gt;I also found the note "Note 158346 - Periodically restart of work processes. &lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Mar 2010 09:58:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/huge-memory-allocation/qaa-p/6711494#M2439342</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-09T09:58:08Z</dc:date>
    </item>
  </channel>
</rss>

