Why only ~half of RAM is used by Oracle on Linux server

memoryoracleoracle-11g-r2

Why Oracle 11.2 would be using only around half of available RAM on RHEL5 box? I have 64GB but 32GB is free which really annoys me. Any memory not used is wasted memory in my books – especially on Linux boxes.

Unfortunately I have no DBAs available currently so can't ask them…

host-rac-1|root[/root]# free -m
             total       used       free     shared    buffers     cached
Mem:         64455      34021      30434          0       1014       2958
-/+ buffers/cache:      30048      34407
Swap:        16415          0      16415
host-rac-1|root[/root]#

/dev/shm only used in 1%:

host-rac-1|root[/root]# df -m |grep tmpfs
tmpfs                    40960       254     40707   1% /dev/shm
host-rac-1|root[/root]#

meminfo:

host-rac-1|root[/root]# cat /proc/meminfo
MemTotal:     66002520 kB
MemFree:      31231544 kB
Buffers:       1039520 kB
Cached:        3022168 kB
SwapCached:          0 kB
Active:        5520172 kB
Inactive:      1245240 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:     66002520 kB
LowFree:      31231544 kB
SwapTotal:    16809976 kB
SwapFree:     16809976 kB
Dirty:            4452 kB
Writeback:           0 kB
AnonPages:     2754560 kB
Mapped:         346652 kB
Slab:           429768 kB
PageTables:     122116 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:  36169508 kB
Committed_AS:  5439032 kB
VmallocTotal: 34359738367 kB
VmallocUsed:    366812 kB
VmallocChunk: 34359371495 kB
HugePages_Total: 13322
HugePages_Free:    500
HugePages_Rsvd:    491
Hugepagesize:     2048 kB

Snippet from init.ora:

###########################################
# Miscellaneous
###########################################
compatible=11.2.0.0.0
db_unique_name=DBNAME
diagnostic_dest=/orabase/dbhome_1
memory_target=13497270272

###########################################
# Processes and Sessions
###########################################
processes=400
sessions=445

If there is anything I could add to improve this questions please let me know.

Best Answer

Normally we allocate about half of the systems memory for shared_pool and database buffers, preferably mapped on huge pages. AMM is not compatible with huge pages so when a dba is working with the system he would disable that and manage the memory manually. Define a minimum size for the database buffers and also for the shared pool.

The rest of the memory is available for processing things like sorts and merges.

Maybe the workload of your system is low and could do with a smaller footprint. I also noticed this is a RAC system. RAC likes to have some free memory.

So as a rule of thumb your system is setup pretty much default and could be adjusted to better suit your workload. The exact sizing depends on the usage of the shared_pool and how much caching your need to give a usable performance. At a certain point performance is not improved by giving more memory.