rechner swapt obwohl noch speicher frei ist

FreeBSD, Gentoo, openSUSE, CentOS, Ubuntu, Debian
albert
Posts: 4
Joined: 2006-04-03 08:15
 

rechner swapt obwohl noch speicher frei ist

Post by albert »

Hallo zusammen,

irgendwie raff ich das nicht. Laut vmstat wird recht viel virtueller Speicher verwendet, obwohl noch RAM frei ist. Hat jemand n Tipp, wie ich rauskriege warum das so ist, und was ich dagegen tun kann?

Hier die Ausgabe von vmstat:

Code: Select all

procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id wa
 2  0  31588  85980  12040 308600    0    0     2     0    2     1  1  0 99  0
 0  0  31588  85980  12040 308600    0    0     0     3 1004    20  0  0 100  0
 0  0  31588  85988  12044 308596    0    0     0    15 1003    19  0  0 100  0
 0  0  31588  85988  12044 308596    0    0     0     0 1003    17  0  0 100  0
 0  0  31588  85980  12044 308596    0    0     0    20 1006    31  0  0 100  0
 0  0  31588  85980  12044 308596    0    0     0     2 1003    18  0  0 100  0
 0  0  31588  85980  12048 308592    0    0     0    36 1009    25  0  0 100  0
Prozesse:

Code: Select all

  
PID TTY      STAT   TIME COMMAND
    1 ?        S      0:11 init [3]
    2 ?        S      0:00 [migration/0]
    3 ?        SN     0:01 [ksoftirqd/0]
    4 ?        S<     0:00 [events/0]
    5 ?        S<     0:00 [khelper]
    6 ?        S<     2:16 [kblockd/0]
    7 ?        S      0:38 [pdflush]
   10 ?        S<     0:00 [aio/0]
    9 ?        S      2:23 [kswapd0]
   11 ?        S<     1:21 [xfslogd/0]
   12 ?        S<     0:00 [xfsdatad/0]
   15 ?        S<     0:00 [ata/0]
   13 ?        S      0:01 [xfsbufd]
   14 ?        S      0:00 [kseriod]
   16 ?        S      0:00 [scsi_eh_0]
   17 ?        S      0:00 [scsi_eh_1]
   18 ?        S      0:50 [kjournald]
  115 ?        S      0:00 [xfssyncd]
  116 ?        S      0:22 [xfssyncd]
  117 ?        S      0:00 [xfssyncd]
  612 ?        Ss     0:00 /sbin/dhcpcd -d -N -Y -t 999999 eth0
  679 ?        Ss     9:05 /sbin/syslogd -a /var/lib/named/dev/log -a /var/lib/ntp/dev/log
  682 ?        Ss     0:00 /sbin/klogd -c 1 -2
  729 ?        Ss     2:08 /usr/sbin/sshd -o PidFile=/var/run/sshd.init.pid
  734 ?        S      0:04 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogger -stderrloggername=imapd -maxprocs=40 -maxperip=
  736 ?        S      0:01 /usr/sbin/courierlogger imapd
  745 ?        S      0:01 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogger -stderrloggername=imapd-ssl -maxprocs=40 -maxpe
  747 ?        S      0:01 /usr/sbin/courierlogger imapd-ssl
  754 ?        S      0:48 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogger -stderrloggername=pop3d -maxprocs=40 -maxperip=
  756 ?        S      0:43 /usr/sbin/courierlogger pop3d
  764 ?        S      0:06 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogger -stderrloggername=pop3d-ssl -maxprocs=40 -maxpe
  766 ?        S      0:04 /usr/sbin/courierlogger pop3d-ssl
  930 ?        SLs    0:01 /usr/sbin/ntpd -p /var/lib/ntp/var/run/ntp/ntpd.pid -u ntp -i /var/lib/ntp
  962 ?        Ss     0:00 /usr/sbin/atd
 1007 ?        Ss     1:06 /usr/sbin/xinetd
 1023 ?        Ss     0:00 /usr/sbin/named -t /var/lib/named -u named
 1024 ?        S      0:00 /usr/sbin/named -t /var/lib/named -u named
 1025 ?        S      1:51 /usr/sbin/named -t /var/lib/named -u named
 1026 ?        S      0:01 /usr/sbin/named -t /var/lib/named -u named
 1027 ?        S      0:01 /usr/sbin/named -t /var/lib/named -u named
 1133 ?        S      0:24 /usr/bin/postmaster -D /var/lib/pgsql/data
 1139 ?        S      0:00 postgres: stats buffer process
 1140 ?        S      0:00 postgres: stats collector process
 1236 ?        Ss     0:00 /sbin/startpar -f -- /etc/init.d/rc3.d/S13psa
 1274 tty1     Ss+    0:00 /sbin/mingetty --noclear tty1
 1275 tty2     Ss+    0:00 /sbin/mingetty tty2
 1276 tty3     Ss+    0:00 /sbin/mingetty tty3
 1277 tty4     Ss+    0:00 /sbin/mingetty tty4
 1278 tty5     Ss+    0:00 /sbin/mingetty tty5
 1279 tty6     Ss+    0:00 /sbin/mingetty tty6
 4357 ?        S      0:00 /bin/sh /usr/bin/mysqld_safe --user=mysql --pid-file=/var/lib/mysql/mysqld.pid --socket=/var/lib/mysql/mysql.sock --datadir=/var/l
 4391 ?        S      1:41 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/mysqld.pid --skip-locking --port=3
 4392 ?        S      1:33 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/mysqld.pid --skip-locking --port=3
 4393 ?        S      0:43 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/mysqld.pid --skip-locking --port=3
 4419 ?        Ss     0:00 /usr/sbin/cron
21335 ?        S      0:19 [pdflush]
 7093 ?        Ss     2:48 /usr/local/psa/admin/bin/modules/watchdog/monit -Ic /usr/local/psa/etc/modules/watchdog/monitrc
 7094 ?        S      0:00 /usr/local/psa/admin/bin/modules/watchdog/monit -Ic /usr/local/psa/etc/modules/watchdog/monitrc
 7095 ?        S      0:00 /usr/local/psa/admin/bin/modules/watchdog/monit -Ic /usr/local/psa/etc/modules/watchdog/monitrc
10143 ?        S      4:18 qmail-send
10145 ?        S      0:21 splogger qmail
10146 ?        S      0:16 qmail-lspawn ./Maildir/
10147 ?        S      0:04 qmail-rspawn
10148 ?        S      0:17 qmail-clean
 1220 ?        Ss     0:01 /usr/local/psa/admin/bin/httpsd
25043 ?        Ss     0:38 /usr/sbin/spamd --username=popuser --daemonize --helper-home-dir=/var/qmail --max-children 20 --create-prefs --nouser-config --vir
25045 ?        Ss     0:04 /usr/sbin/spamd --username=popuser --daemonize --helper-home-dir=/var/qmail --max-children 20 --create-prefs --nouser-config --vir
 1761 ?        Ss     0:00 sshd: root@pts/0
 1764 pts/0    Ss     0:00 -bash
 2702 ?        S      0:06 /usr/local/psa/admin/bin/httpsd
 2706 ?        S      0:11 /usr/local/psa/admin/bin/httpsd
 7040 ?        S      0:00 /usr/bin/imapd Maildir
 8004 ?        Ss     0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
 8010 ?        S      0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
 8011 ?        S      0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
 8012 ?        S      0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
 8013 ?        S      0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
 8014 ?        S      0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
 8015 ?        S      0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
 8021 ?        S      0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
 8040 ?        S      0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
 8192 pts/0    R+     0:00 ps ax
Braucht ihr noch irgendwelche Infos?

Vielen Dank und Viele Grüße,
albert!
Roger Wilco
Posts: 5923
Joined: 2004-05-23 12:53
 

Re: rechner swapt obwohl noch speicher frei ist

Post by Roger Wilco »

Wieviel der Memory-Manager von deinem System swappen soll, kannst du mit dem Paramter vm.swappiness (/proc/sys/vm/swappiness) festlegen.

http://kerneltrap.org/node/3000
http://www.brunolinux.com/06-Fine_Tunin ... iness.html
http://www.thomashertweck.de/linuxram.html
albert
Posts: 4
Joined: 2006-04-03 08:15
 

Re: rechner swapt obwohl noch speicher frei ist

Post by albert »

Danke für die schnelle Antwort!

Da steht 60 drin. kann also nicht alles sein.
albert
Posts: 4
Joined: 2006-04-03 08:15
 

Re: rechner swapt obwohl noch speicher frei ist

Post by albert »

entschuldige, dachte die links gehörten zu deinem footer.. betriebsblindheit. hab jetzt nachgelesen, is ne prozentuale angabe, also alles klar :)

edit: also so wie ich das sehe, hab ich dann ja kein (performance) problem auf meinem rootserver, richtig? ich war halt nur unsicher, weil ich auf ner seite gelesen hab, dass alles was häufig über 10 liegt ein schlechter wert fürs swappen ist. das gilt dann also nicht für den neueren kernel?