Server mit RAM-Problemen ohne ersichtlichen Grund

Maize

New Member
Hallo Zusammen,

ich wende mich an euch weil ich ziemliche Probleme mit meinem VServer habe.
Ich habe einen Vserver Platinum X4 von Server4You.

5GB RAM sind zugesichert, 10GB RAM sind Limit.

OS ist CentOS 5.2.

Ich habe einige Programme laufen die tatsächlich sehr speicherintensiv sind und möglicherweise sogar nicht optimal programmiert (memory leaks nicht auszuschließen).

Das eigenartige ist, dass laut vzfree bzw free ich gerade einmal 2GB RAM nutze:

Code:
[root@makemehost ~]# perl vzfree
VPS Speichernutzung:
Momentan genutzt:       2396.95 MB
Maximal genutzt:        5127.9 MB
Zugesichert:            5120 MB
Maximal nutzbar:        11264 MB

Code:
[root@makemehost ~]# free
             total       used       free     shared    buffers     cached
Mem:      10485760    2448984    8036776          0          0          0
-/+ buffers/cache:    2448984    8036776
Swap:            0          0          0


Wenn ich mir aber /proc/user_beancounters anschaue sieht das ganze gleich ganz anders aus:

Code:
[root@makemehost ~]# cat /proc/user_beancounters
Version: 2.5
       uid  resource                     held              maxheld              barrier                limit              failcnt
    159192: kmemsize                 72955583             87679843             87662592             97402880             11494734
            lockedpages                     0                    0                 2893                 2893                    0
            privvmpages                612287              1312742              2621440              2883584                    0
            shmpages                     5945                 7321                61912                61912                    0
            dummy                           0                    0                    0                    0                    0
            numproc                       526                 1025                 1200                 1200                    0
            physpages                  390460              1054804                    0  9223372036854775807                    0
            vmguarpages                     0                    0              1310720  9223372036854775807                    0
            oomguarpages               392326              1054919              1310720  9223372036854775807                    0
            numtcpsock                    547                  999                 1446                 1446                    0
            numflock                        6                   86                 1000                 1100                    0
            numpty                         19                   20                  144                  144                    0
            numsiginfo                      0                   42                 1024                 1024                    0
            tcpsndbuf                 2550568              8652888             13829711             19752527                    0
            tcprcvbuf                 1725864             13832632             13829711             19752527                   41
            othersockbuf               451008              1858544              6914855             12837671                    0
            dgramrcvbuf                     0               399960              6914855              6914855                    0
            numothersock                  634                 1137                 1446                 1446                    0
            dcachesize                2185812              2983014             12938190             13326336                    0
            numfile                      8451                15383                23136                23136                    0
            dummy                           0                    0                    0                    0                    0
            dummy                           0                    0                    0                    0                    0
            dummy                           0                    0                    0                    0                    0
            numiptent                      10                   10                  256                  256                    0

Mein ps aux poste ich auch mal

Code:
[root@makemehost ~]# ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   1996   672 ?        Ss   Jun04   0:13 init [3]
root      7758  0.0  0.0   2088   640 ?        S<s  Jun04   0:00 /sbin/udevd -d
root      9417  0.0  0.0   1660   580 ?        Ss   Jun04   0:44 syslogd -m 0
root      9440  0.0  0.0   6996  1064 ?        Ss   Jun04   0:38 /usr/sbin/sshd
root      9452  0.0  0.0   2656   924 ?        Ss   Jun04   0:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
root      9468  0.0  0.0   5864   820 ?        S    Jun04   0:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogger -stderrlog
root      9478  0.0  0.0   4700  1108 ?        S    Jun04   0:00 /usr/sbin/courierlogger imapd
root      9550  0.0  0.0   5864   820 ?        S    Jun04   0:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogger -stderrlog
root      9552  0.0  0.0   4700  1108 ?        S    Jun04   0:00 /usr/sbin/courierlogger imapd-ssl
root      9558  0.0  0.0   5872   860 ?        S    Jun04   0:04 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogger -stderrlog
root      9567  0.0  0.0   4700  1108 ?        S    Jun04   0:02 /usr/sbin/courierlogger pop3d
root      9577  0.0  0.0   5872   860 ?        S    Jun04   0:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogger -stderrlog
root      9579  0.0  0.0   4700  1108 ?        S    Jun04   0:00 /usr/sbin/courierlogger pop3d-ssl
qmails    9593  0.0  0.0   1640   504 ?        S    Jun04   0:03 qmail-send
qmaill    9600  0.0  0.0   1592   480 ?        S    Jun04   0:00 splogger qmail
root      9601  0.0  0.0   1624   388 ?        S    Jun04   0:00 qmail-lspawn | /usr/bin/deliverquota ./Maildir
qmailr    9602  0.0  0.0   1616   396 ?        S    Jun04   0:00 qmail-rspawn
qmailq    9603  0.0  0.0   1584   356 ?        S    Jun04   0:00 qmail-clean
named     9695  0.0  0.0 193712  3932 ?        Ssl  Jun04   0:06 /usr/sbin/named -u named -c /etc/named.conf -u named -t /var/named/run-root
root     11362  0.0  0.0  41868  6256 ?        Ss   Jun04   0:00 /usr/local/psa/admin/bin/httpsd
root     11464  0.0  0.0   3244  1128 ?        Ss   Jun04   0:01 crond
root     12081  0.0  0.0   2968  1288 ?        Ss   Jun04   0:00 SCREEN -S botwritesql
root     12083  0.0  0.0   2532  1432 pts/1    Ss   Jun04   0:00 /bin/bash
root     15804  0.0  0.0   2992  1292 ?        Ss   Jun04  54:43 SCREEN -S queue
root     15846  0.0  0.0   2532  1420 pts/2    Ss   Jun04   0:00 /bin/bash
root      5999  0.0  0.0   2992  1276 ?        Ss   Jun04   0:00 SCREEN -S mmh1
root      6000  0.0  0.0   2532  1412 pts/3    Ss+  Jun04   0:00 /bin/bash
root      7329  0.0  0.0   2988  1268 ?        Ss   Jun04   0:00 SCREEN -S mmh2
root      7330  0.0  0.0   2532  1412 pts/4    Ss   Jun04   0:00 /bin/bash
root      7568  0.0  0.0   2992  1276 ?        Ss   Jun04   0:00 SCREEN -S mmh3
root      7569  0.0  0.0   2532  1428 pts/5    Ss   Jun04   0:00 /bin/bash
root      7950  0.0  0.0   2992  1268 ?        Ss   Jun04   0:00 SCREEN -S mmh4
root      7952  0.0  0.0   2532  1408 pts/6    Ss   Jun04   0:00 /bin/bash
root      8188  0.0  0.0   2992  1276 ?        Ss   Jun04   0:00 SCREEN -S mmh5
root      8190  0.0  0.0   2532  1428 pts/7    Ss   Jun04   0:00 /bin/bash
root      9429  0.0  0.0   2992  1276 ?        Ss   Jun04   0:00 SCREEN -S mmh6
root      9430  0.0  0.0   2532  1412 pts/8    Ss   Jun04   0:00 /bin/bash
root      9619  0.0  0.0   2992  1280 ?        Ss   Jun04   0:00 SCREEN -S mmh7
root      9620  0.0  0.0   2532  1412 pts/9    Ss   Jun04   0:00 /bin/bash
root     10016  0.0  0.0   2992  1268 ?        Ss   Jun04   0:00 SCREEN -S mmh8
root     10017  0.0  0.0   2532  1412 pts/10   Ss   Jun04   0:00 /bin/bash

root     11570  0.0  0.0   2992  1268 ?        Ss   Jun04   0:00 SCREEN -S mmh12
root     11571  0.0  0.0   2532  1412 pts/11   Ss   Jun04   0:00 /bin/bash
root     11687  0.0  0.0   2992  1272 ?        Ss   Jun04   0:00 SCREEN -S mmh13
root     11689  0.0  0.0   2532  1412 pts/12   Ss   Jun04   0:00 /bin/bash
root     11909  0.0  0.0   2992  1268 ?        Ss   Jun04   0:00 SCREEN -S mmh14
root     11910  0.0  0.0   2532  1412 pts/13   Ss   Jun04   0:00 /bin/bash
root     13329  0.0  0.0   2992  1268 ?        Ss   Jun04   0:00 SCREEN -S mmh15
root     13330  0.0  0.0   2532  1404 pts/14   Ss   Jun04   0:00 /bin/bash
root     13898  0.0  0.0   2992  1292 ?        Ss   Jun04   0:00 SCREEN -S mmh16
root     13900  0.0  0.0   2532  1412 pts/15   Ss   Jun04   0:00 /bin/bash
root     15507  0.0  0.0   2992  1272 ?        Ss   Jun04   0:00 SCREEN -S mmh17
root     15513  0.0  0.0   2532  1412 pts/16   Ss+  Jun04   0:00 /bin/bash
root     16151  0.0  0.0   2992  1272 ?        Ss   Jun04   0:00 SCREEN -S mmh18
root     16152  0.0  0.0   2532  1412 pts/17   Ss   Jun04   0:00 /bin/bash
root     17546  0.0  0.0   3000  1280 ?        Ss   Jun04   0:00 SCREEN -S mmh19
root     17548  0.0  0.0   2532  1412 pts/18   Ss+  Jun04   0:00 /bin/bash
root     10084  0.0  0.1  28252 11672 ?        Ss   Jun18   2:52 /usr/sbin/httpd
root     16300  0.0  0.0   2340  1084 ?        S    Jun24   0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --lo
mysql    17531 11.2  1.4 219036 150380 ?       Sl   Jun24 3199:30 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run
psaadm   27965  0.0  0.2  48320 22600 ?        S    Jul08   0:21 /usr/local/psa/admin/bin/httpsd
psaadm   13930  0.0  0.2  48436 23260 ?        S    Jul09   0:19 /usr/local/psa/admin/bin/httpsd
root     23870  2.7  1.3 199400 137760 pts/11  S+   Jul10 152:32 ./ghost++
root      4003  3.2  1.2 188620 130164 pts/13  S+   Jul10 171:24 ./ghost++
root     11729  2.7  1.1 176092 119168 pts/14  S+   Jul10 144:48 ./ghost++
root     25995  3.0  1.0 172668 112176 pts/12  S+   Jul11 135:06 ./ghost++
root     11751  2.7  1.0 164224 106812 pts/17  S+   Jul11 120:14 ./ghost++
root     26446  2.4  1.0 162064 105280 pts/15  S+   Jul11 107:06 ./ghost++
root      7678  1.8  0.8 141924 85540 pts/10   S+   Jul11  76:48 ./ghost++
psaadm    1422  0.0  0.2  48180 22676 ?        S    Jul11   0:10 /usr/local/psa/admin/bin/httpsd
root     24541  2.1  0.8 141996 85884 pts/9    S+   Jul11  84:25 ./ghost++
root     26417  2.3  0.8 149424 91152 pts/7    S+   Jul11  91:28 ./ghost++
root     29931  2.6  0.9 153888 95784 pts/5    S+   Jul11 102:50 ./ghost++
root     16134  2.9  0.8 150328 91160 pts/4    S+   Jul11 111:55 ./ghost++
root     20383  2.5  0.8 146760 87140 pts/6    S+   Jul11  96:42 ./ghost++
root     21770  2.4  0.7 137784 81780 pts/8    S+   Jul12  79:21 ./ghost++
apache    9546  0.0  0.0  29048  8412 ?        S    Jul12   0:08 /usr/sbin/httpd
apache    9547  0.0  0.0  29084  8452 ?        S    Jul12   0:38 /usr/sbin/httpd
apache   32473  0.0  0.0  28908  8132 ?        S    Jul12   0:04 /usr/sbin/httpd
root     30255  0.0  0.0  21312  7588 pts/1    S+   01:14   0:48 php botwritesql.php
root      1770  0.0  0.0  21280  7516 pts/2    S+   01:14   0:02 php queue.php
root      5828  0.0  0.0  11960  3144 ?        Ss   14:25   0:00 sshd: root@pts/0
root      7332  0.0  0.0   2528  1400 pts/0    Ss   14:25   0:00 -bash
apache   16159  0.3  0.0  29040  8500 ?        S    15:02   0:01 /usr/sbin/httpd
apache   24474  0.7  0.0  29056  8332 ?        S    15:03   0:03 /usr/sbin/httpd
apache   28102  0.7  0.0  29032  8332 ?        S    15:04   0:02 /usr/sbin/httpd
apache   28304  0.7  0.0  29040  8332 ?        S    15:04   0:02 /usr/sbin/httpd
apache   30012  0.7  0.0  29028  8376 ?        S    15:04   0:02 /usr/sbin/httpd
apache   30275  0.7  0.0  29044  8332 ?        S    15:04   0:02 /usr/sbin/httpd
apache    3880  0.6  0.0  29044  8332 ?        S    15:05   0:02 /usr/sbin/httpd
apache    5644  0.7  0.0  29060  8332 ?        S    15:05   0:02 /usr/sbin/httpd
apache    5678  0.7  0.0  28912  8120 ?        S    15:05   0:02 /usr/sbin/httpd
apache    5682  0.7  0.0  29044  8320 ?        S    15:05   0:02 /usr/sbin/httpd
apache    5723  0.7  0.0  29012  8164 ?        S    15:05   0:02 /usr/sbin/httpd
apache    5757  0.8  0.0  29044  8328 ?        S    15:05   0:02 /usr/sbin/httpd
apache    5837  0.7  0.0  29044  8332 ?        S    15:05   0:02 /usr/sbin/httpd
apache    7231  0.7  0.0  29040  8324 ?        S    15:05   0:02 /usr/sbin/httpd
apache    7377  0.7  0.0  29040  8296 ?        S    15:05   0:02 /usr/sbin/httpd
apache    3356  1.0  0.0  28804  7616 ?        S    15:10   0:00 /usr/sbin/httpd
root      3382  0.0  0.0   2112   840 pts/0    R+   15:10   0:00 ps aux


Warum wird der RAM nicht richtig angezeigt. Ich habe nicht so viel Ahnung von VServern vielleicht kann mich jemand aufklären.

Können Screens ein Grund für Memory Leaks sein?


Danke und Gruß
Maize
 
Naja, mit free, top und auch in Plesk ist meine Memoryauslastung eher niedrig.

Mit dem proc beancounts bin ich aber am Anschlag.

Im ps aux ist mir nicht ganz ersichtlich wofür der ganze RAM draufgeht.

Gruß
Maize
 
Koennte es sein dass du kmemsize statt privvmpages beachtest?
Lies mal: Understanding UBC


deine privvmpages haben ein maxheld welches knapp die Haelfte der Barrier ist ;)
Dein aktueller wert ist knapp 1/5 des Limits...
 
Ehm okay, ich dachte kmemsize ist der tatsächlich verwendete Speicher?

Warum habe ich so einen hohen failcount bei kmemsize?
Ich werde irgendwie nicht so recht schlau aus den Erklärungen die ich überall über kmemsize lese.

Code:
kmemsize 	 system 	 Size of unswappable kernel memory allocated for processes in this Container
Welcher container? Kernel container? Also was mein OS an memory braucht?
 
Welcher container? Kernel container? Also was mein OS an memory braucht?

Code:
Size of unswappable memory in bytes, allocated by the operating system kernel.
It includes all the kernel internal data structures associated with the container's processes, except the network buffers discussed below.
(http://wiki.openvz.org/UBC_secondary_parameters)
Code:
kmemsize - When allowing a container access to a certain amount of memory, not all of it will be used in the same way. kmemsize is the amount of bytes that will be used for kernel activity of that specific container. Creating a large amount of processes requires quite some kernel intervention, so make sure it gets the memory it needs to keep track of the processes' data structures. [...]
=> http://www.anandtech.com/show/3599

Das Betriebssystem besteht aus mehr als nur dem Linux-Kernel. Aber alles ausser dem Kernel sowie seinen Treibern und Buffer selbst liegt ausserhalb des Kernel-Speichers im Userspace :)

Ein hoher Failcount bedeutet dass du (zu) viele Prozesse oder (zu) grosse Prozesse hast.
 
Back
Top