9 Replies Latest reply: Dec 29, 2012 3:55 AM by Erman Arslan RSS

    RAM usage always full

    Sivamani
      Hi all,

      We are having RHEL 5.8 server.It is the db tier of our test oracle application R12.1.3 .
      For the past 20 days it always using the full RAM memory.Before 2 weeks the server has 4 GB ram and we thought that we may have insufficient memory.So we increased the RAM size by 6 GB.Now the total RAM memory is 10G. But again the server started to use the full RAM memory..

      output of free -m

      total used free shared buffers cached
      Mem: 9991 9935 56 0 27 8323
      -/+ buffers/cache: 1584 8407
      Swap: 7967 106 7861


      and the output of the top command is (Result sorted by memory usage)

      PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
      4962 oratest 15 0 1268m 532m 516m S 0.0 5.3 0:04.74 oracle
      4972 oratest 15 0 1257m 511m 505m S 0.0 5.1 0:07.86 oracle
      4968 oratest 15 0 1258m 319m 313m S 0.0 3.2 0:06.60 oracle
      5982 oratest 15 0 1259m 284m 276m S 0.0 2.8 1:20.42 oracle
      5418 oratest 15 0 1263m 248m 240m S 0.0 2.5 0:09.42 oracle
      5439 oratest 15 0 1269m 210m 197m S 0.0 2.1 0:03.05 oracle
      5431 oratest 15 0 1269m 209m 196m S 0.0 2.1 0:02.14 oracle
      5535 oratest 15 0 1257m 181m 175m S 0.0 1.8 0:31.43 oracle
      7667 oratest 15 0 1259m 179m 171m S 0.0 1.8 0:02.26 oracle
      7695 oratest 15 0 1257m 158m 151m S 0.0 1.6 0:02.12 oracle
      5445 oratest 15 0 1264m 157m 146m S 0.0 1.6 0:29.11 oracle
      4960 oratest 15 0 1251m 150m 148m S 0.0 1.5 0:00.18 oracle
      5786 oratest 15 0 1266m 144m 134m S 0.0 1.4 0:01.06 oracle
      5611 oratest 15 0 1263m 143m 133m S 0.0 1.4 0:00.66 oracle
      5621 oratest 15 0 1259m 142m 134m S 0.0 1.4 0:00.79 oracle
      5782 oratest 15 0 1266m 141m 132m S 0.0 1.4 0:00.80 oracle
      5575 oratest 15 0 1257m 139m 131m S 0.0 1.4 0:02.09 oracle
      5579 oratest 15 0 1257m 133m 127m S 0.0 1.3 0:01.95 oracle
      4992 oratest 15 0 1257m 119m 112m S 0.0 1.2 0:00.99 oracle
      9103 oratest 15 0 1257m 115m 109m S 0.0 1.2 0:01.48 oracle
      5702 oratest 15 0 1263m 113m 104m S 0.0 1.1 0:01.79 oracle
      7724 oratest 15 0 1257m 112m 107m S 0.0 1.1 0:01.71 oracle
      10781 oratest 15 0 1257m 111m 105m S 0.0 1.1 0:01.06 oracle
      5537 oratest 15 0 1257m 111m 105m S 0.0 1.1 0:01.71 oracle


      Can anyone please assist me.

      Thanks.

      Edited by: Sivamani on Dec 11, 2012 5:08 PM
        • 1. Re: RAM usage always full
          Catch~22
          The Linux kernel automatically uses all available RAM for caching the file system to increase file access performance. Should the system require more RAM for processes, the memory for the buffer cache will automatically shrink as required. Looking at your output, I'd say there is nothing to worry about.

          Btw, Oracle processes use shared memory, either Posix /dev/shm (AMM) or conventional (normal 4k or non-swap 2 MB hugepages). You can check it with the ipcs -m command and df /dev/shm. /dev/shm is 50 % of physical RAM by default, allocated only when used.
          • 2. Re: RAM usage always full
            Sivamani
            When i m checking through the system monitor it showing only 1.6 GB RAM is used..

            Why these difference between top and system moniter
            • 3. Re: RAM usage always full
              Sivamani
              there are many times the CPU usage increases upto 100% usage and the swap space usage is empty..

              There are two oracle database server (using for oracle application r12.1.3) sitting on this redhat server.Now only one db server is up and running since it CPU memory usage is going to 100 % we are unable to up the other one oracle server.

              Please suggest how i can identify the root cause of this problem..

              FYI - The problem is happening after we cloned our Oracle Application.

              Thanks
              • 4. Re: RAM usage always full
                Sivamani
                Hi

                I understood the difference between top and memory monitor by seeing some other posts..
                But please tell the workaround for the issue now i m having with the CPU usage..

                Thanks
                • 5. Re: RAM usage always full
                  Sivamani
                  Fyi - when the CPU usage is high i used system moniter to check which process is using more CPU.

                  and did the following

                  system moniter->process (the process which is consuming more CPU memory) ->memory maps-> VM Size

                  Its showing 43917.1 GiB.


                  Is this a strange behavior or is this a normal one ?

                  And the process is pointing to the

                  /ebs/TEST/bin/db/tech_st/11.2.0/lib/libocrutl11.so
                  /ebs/TEST/bin/db/tech_st/11.2.0/lib/libnque11.so

                  Please advise on this ..Thanks
                  • 6. Re: RAM usage always full
                    898553
                    What kind of hardware are you running on? What's your SGA? Have you taken a look at the output of 'iostat -x 5' and seen any I/O issues?
                    • 7. Re: RAM usage always full
                      Erman Arslan
                      it should be your sga.
                      oracle processes maps sga. code, libraries it seems mapped files are also calculated.
                      VM size almost irrelevant to measure memory usage.

                      For example on the "top" command there is VIRT column.
                      VIRT -- Virtual Image (kb)
                      The total amount of virtual memory used by the task. It
                      includes all code, data and shared libraries plus pages that
                      have been swapped out.
                      • 8. Re: RAM usage always full
                        Catch~22
                        it should be your sga.
                        The size of the SGA does not automatically adjust to the amount of installed RAM.

                        I'm afraid what the OP experiences is the kernel buffer cache, and nothing to worry about.
                        • 9. Re: RAM usage always full
                          Erman Arslan
                          What I meant to say is the process maps the sga,as the topic of this thread is about the ram usage of the process. Mapped Sga will vm size to be large, and ram usage will seem large, but no harm.

                          Edited by: Erman Arslan on 29.Ara.2012 01:52