LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   RAM usage on Red Hat Linux (https://www.linuxquestions.org/questions/linux-newbie-8/ram-usage-on-red-hat-linux-860760/)

linuxdba 02-04-2011 02:52 PM

RAM usage on Red Hat Linux
 
In our database linux server free -m is showing below and I see -/+ buffers/cache: it is showing 30GB is free

free -m
total used free shared buffers cached
Mem: 32185 31744 441 0 361 29840
-/+ buffers/cache: 1542 30643
Swap: 34175 1917 32258

But we have 7 databases and as per ipcs Oracle is using about 12GB and so why free is shoing 30GB is free as total RAM on the server is 32GB and if Oracle is using about 12GB it should show 20GB is free.Any inputs from any one :

------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 6291458 root 644 80 2
0x00000000 6324228 root 644 16384 2
0x00000000 6356997 root 644 280 2
0x557f3388 6389766 orauser 640 1612709888 18
0x4cdcb10c 6422535 orauser 640 1612709888 18
0x468197c0 6455304 orauser 640 2636120064 17
0x47949aa8 6488073 orauser 640 2636120064 17
0xc80b04ac 6520842 orauser 640 207618048 32
0x3fb11da4 6586380 orauser 660 1260388352 26
0x28d43e04 6651917 orauser 660 1260388352 21

johnsfine 02-04-2011 04:50 PM

You should edit your first post in this thread, select advanced, then edit the title to ask about Oracle ram usage, not Red Hat ram usage. Then you might get the attention of someone knowing the answer.

Nothing in your question is specific to Red Hat. The important part of your question is specific to Oracle.

Quote:

Originally Posted by linuxdba (Post 4248594)
In our database linux server free -m is showing below and I see -/+ buffers/cache: it is showing 30GB is free

Trust that number. It is correct and I think its meaning is close to what you think it means.

Quote:

as per ipcs Oracle is using about 12GB
"using" is a complicated concept in this context and may not mean what you think it means.

I don't know how to interpret output from ipcs. I see you are adding together the sizes of all those shared memory segments. But what do you think doing so means?

Obviously most of the total size of those shared segments is not physically mapped (resident) in any process, so it is not "used" in the sense that the -/+ buffers/cache line reports used memory.

I don't know whether shared regions might be "demand zero" or other forms of basically non existent memory. I expect so, but I don't really know. If they can then the reported size may be much bigger than the actual memory used.

Whether 12GB or far less, the memory of the shared regions might be part of the cache memory. There is no good definition of "used" memory for Linux. That -/+ buffers/cache line excludes the cache from "used", but a large part of your processes' address spaces might be in cache (rather than "resident") and might be soft faulted in and out of resident.

I don't know any way to tell what fraction of the cache is involved in ongoing soft faulting.

syg00 02-04-2011 08:10 PM

I believe the Oracle SGA is reported in the "cached" section - so your 12 Gig of (Oracle) shared memory is a subset of that cached number.
"free" merely subtracts the total of cached without being aware of its contents/structure.


All times are GMT -5. The time now is 03:45 PM.