Re: RHEL memory questions

From: De DBA <dedba_at_tpg.com.au>
Date: Thu, 01 Oct 2015 13:48:08 +1000
Message-ID: <560CACF8.8000407_at_tpg.com.au>



Hi David,

Yes this is normal. As an aside, you may be losing important detail by using the "-g" switch on the free(1) utility. On my workstation:

$ free -tg

              total       used       free     shared buffers     cached
Mem:             7          5          1 0          0          3
-/+ buffers/cache:          1          5
Swap:            0          0          0
Total:           8          5          2

There is no swap at all...! Of course there is, but it's just under 1 GB:

$ free -th

              total       used       free     shared buffers     cached
Mem:          7.3G       5.8G       1.5G         0B 237M       3.8G
-/+ buffers/cache:       1.8G       5.5G
Swap:         972M        16M       956M
Total:        8.3G       5.9G       2.4G

In monitoring scripts it may be useful to use the -m switch, or just keep the default output (kB on my system).

Unlike Windows, the Linux kernel optimises performance by using spare physical memory for things as file buffer and paging, and refrains from paging out to disk until all other options are exhausted (including reducing buffers and cache to the absolute necessary minimum). Actual free memory is close to (but not exactly) free + buffers + cached, some 5.5GB in the above case, as shown in the second line. Not all buffers and cache can be de-allocated, so it's not exact that. Swap as reported by free(1) and friends is the swap device, not total paging space.

On your server, 4GB is actually in use, 58GB is "free" (taking buffers & cache into account).

Hth.

Tony

On 01/10/15 09:53, David Ramírez Reyes wrote:
>
> Hello List!
>
> Am just starting working with Oracle (11g R2) over RHEL(5) and I have some basic doubts that I would like to clarify (until now, I’ve been working with Oracle over Windows):
>
> -As part of a daily DB report, I need to check the memory usage of the server and am getting these:
>
> total used free shared buffers cached
>
> Mem: 62 61 1 0 1 55
>
> -/+ buffers/cache: 4 58
>
> Swap: 31 0 31
>
> Total: 94 61 33
>
> As you can see, “free” memory is almost over (although there’s no swap) which makes me report that memory usage is at 98% (it sounds strange to me), is this a normal behavior?; I’ve checked the processes running and there’s no a pick process but many opened by the oracle connections to the DB; depending on the answer, the next questions would be if more memory is required or if there’s a way to limit the memory that Oracle uses (on Windows, there’s a single Oracle process –with all subprocesses inside- and is very easy to determine and restrict the memory used by the DB, here in Linux seems like I need to sum the memory used by all processes for oracle user and seems not easy to restrict to a limit, is this correct?).
>
> Any advice, tip or trick for an Oracle DBA over Linux is well received.
>
> Thanks
>
> David Ramírez Reyes
> Profesión: Padre de Familia
>
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Oct 01 2015 - 05:48:08 CEST

Original text of this message