Inhaltsverzeichnis
Speicherbedarf der DB Prozesse in Linux ermitteln
Prozessliste auswerten
Für welche Datenbank sind wieviele Anwenderprozesse gestartet
ps -Af | grep oracle | awk '{ print $8 }' | sort | uniq -c | sort -nr 118 oraclePIST 87 oracleMYDB 79 oracleMDG 41 oracleBKGJ 40 oracleIZTH 37 oracleORCT 9 oracleCONPT 3 oracleZOI 3 oracleTET 2 oracleME 2 oracleDERD
Standard Befehle
Einfache Standardbefehle unter linux um Load, Speicherverbrauch, Swap Verhalten zu überwachen
- utime
- procinfo
- w
- top
- free -m
- pmap -d <pid>
- vmstat -s
Speicher Bausteine auswerten
- dmidecode
pmap
Beispiel : pmap -d
Ausgabe gekürzt:
20729 20729: oracleCODFG (LOCAL=NO) Address Kbytes Mode Offset Device Mapping 0000000000400000 92916 r-x-- 0000000000000000 068:00001 oracle 0000000005fbc000 6532 rw--- 0000000005abc000 068:00001 oracle 000000000661d000 644 rwx-- 000000000661d000 000:00000 [ anon ] 0000000060000000 1026048 rw-s- 0000000000000000 000:00006 [ shmid=0x270002 ] 0000002a95556000 84 r-x-- 0000000000000000 068:00001 ld-2.3.3.so 0000002a9556b000 4 rw--- 0000002a9556b000 000:00000 [ anon ] 0000002a9566a000 12 rw--- 0000000000014000 068:00001 ld-2.3.3.so 0000002a9566d000 148 r-x-- 0000000000000000 068:00001 libskgxp10.so 0000002a95692000 1024 ----- 0000000000025000 068:00001 libskgxp10.so 0000002a95792000 8 rw--- 0000000000025000 068:00001 libskgxp10.so 0000002a95794000 4 rw--- 0000002a95794000 000:00000 [ anon ] ..... 0000002a97c2b000 1020 ----- 0000000000009000 068:00001 libnss_files.so.2 0000002a97d2a000 8 rw--- 0000000000008000 068:00001 libnss_files.so.2 0000007fbffe4000 112 rwx-- 0000007fbffe4000 000:00000 [ stack ] ffffffffff600000 8192 ----- 0000000000000000 000:00000 [ anon ] mapped: 1174036K writeable/private: 11884K shared: 1026048K
Jede „Shared Library“ wird zweimal angeführt.
Einmal für das Codesegment (Mode r-x–) und einmal für das Datensegment (Mode rw—) der Library.
Die Zeile „0000000060000000 1026048 rw-s- 0000000000000000 000:00006 [ shmid=0x270002 ]“
zeigt den Verweis auf die SGA (SGA_TARGET mit 1000M eingestellt) ?
Laut letzer Zeile „mapped: 1174036K writeable/private: 11884K shared: 1026048K“ verwendet der Prozess writeable/private 11884K Speicher für sich selbst
[ anon ] = Anonymous Memory (Anon) siehe manpage wie http://compute.cnr.berkeley.edu/cgi-bin/man-cgi?pmap+1
Quelle: http://wiki.debianforum.de/LinuxSpeichermanagement
alles zusammenzählen:
ps -Af | grep CODA | awk '{print $2}' pmap -d | grep writeable/private | awk '{print $4}'
nmon
Ähnlich wie top, aber deutlich mächtiger
Eigentlich für IBM Aix entworfen, gibt es aber auch für Linux
siehe http://www.ibm.com/developerworks/aix/library/au-analyze_aix/
Download für Linux unter http://nmon.sourceforge.net/pmwiki.php
auf Oracle Enterprise Linux v5.5 die OpenSuse11 Variante verwenden
ORA-00845: MEMORY_TARGET not supported on this system
ORA-00845 oder Eintrag in Alert Log
WARNING: You are trying to use the MEMORY_TARGET feature. This feature requires the /dev/shm file system to be mounted for at least 4093640704 bytes. /dev/shm is either not mounted or is mounted with available space less than this size. Please fix this so that MEMORY_TARGET can work as expected. Current available is 2279227392 and used is 4163223552 bytes. Ensure that the mount point is /dev/shm for this directory.
memory_target needs larger /dev/shm
Ursache:
- if the shared memory which is mapped to /dev/shm directory is less than the size of MEMORY_TARGET or MEMORY_MAX_TARGET
- If the shared memory is not mapped to /dev/shm directory
Überprüfen:
$ df -h /dev/shm Filesystem Size Used Avail Use% Mounted on tmpfs 6.0G 3.9G 2.2G 65% /dev/shm
Hinzufügen als root
mount -t tmpfs shmfs -o size=30g /dev/shm
oder vergrößern mit
mount -o remount,size=30G /dev/shm
in fstab eintragen:
tmpfs /dev/shm tmpfs size=30g 0 0