Author: Donald K. Burleson
Oracle is amongst world's most popular yet complex databases. Contention for Random Access Memory (RAM) has always been a problem for Oracle. All database servers have a limited amount of available RAM, and this RAM must be shared between the Oracle database and all external sessions that connects to the server and consumes RAM in their Program Global Area (PGA).
However, before we go into detecting if your server memory is exceeded, you must first determine how much memory is available on your server. In this article I will help you determine how much RAM exists on your server.
Determining RAM Size on Linux:
In Linux the free command can be used to quickly display the amount of RAM memory on the server.
>free
total used free shared buffers cached
Mem: 3728668 504688 3223980 41316 430072 29440
-/+ buffers/cache: 45176 3683492
Swap: 265032 608 264424
Determining RAM Size on Solaris:
The prtconf command can also be used on all Solaris servers to quickly see the amount of available memory.
>prtconf|grep -i mem
Memory size: 2048 Megabytes
memory (driver not attached)
virtual-memory (driver not attached)
Determining RAM Size on DE C-Unix:
In DEC-Unix, you can use the uerf command in conjunction with grep to display memory size.
uerf -r 300 | grep -i mem
The output of the uerf command is piped to grep to filter out and display the segments relating to memory.
The –i option causes grep to find both uppercase and lowercase strings.
grep –i mem looks for both MEM and mem.
Determining RAM Size on HP-UX:
In HPUX the dmesg command can display memory information.
dmesg
This will give the memory information like
physical page size = 4096 bytes, logical page size = 4096 bytes
Physical: 5242880 Kbytes, lockable: 4051216 Kbytes, available: 4651796 Kbytes
Determining RAM Size on AIX:
In IBM's AIX dialect of Unix, you must issue two separate commands.
Start with the lsdev command followed by the lsattr command to display the amount of memory on a server.
First execute lsdev to list all devices.
Then pipe that output through grep to filter out everything not related to memory. That will get you the name of the memory devices that are installed.
>lsdev -C|grep mem
mem0 Available 00-00 Memory
Here mem0 is the name of the memory device.
Now that you have the name, you can issue the lsattr –El command to see the amount of memory on the server.
>lsattr -El mem0
size 3064 Total amount of physical memory in Mbytes goodsize 3064 Amount of usable physical memory in Mbytes
Remember you must issue the lsattr –El command separately for each memory device.
More Oracle Articles, Database Articles and DBA Tips
Database Security: Step by step guideline
Common Mistakes in Oracle Recovery, Interesting facts!
Extending Tablespaces made Efficient and Simple!!
Great Tips for Switchover to Physical Standby Database!!
SQL Injection Attacks - Are you safe?
|