Uses to much memory?

gwydion800

Verified User
Joined
Aug 31, 2010
Messages
18
The server seem to be using way to much memory, first it was good but after a while it was eating 2gb and now it's eating over 4GB there is only 4 users on the server.




free -m
Code:
[root@xentos backup]# free -m
             total       used       free     shared    buffers     cached
Mem:          7973       4571       3402          0        244       3978
-/+ buffers/cache:        347       7625
Swap:         9977          0       9977







ps aux
Code:
[root@xentos home]# cd ..
[root@xentos /]# $MOUNT_POINT/backup
-bash: /backup: No such file or directory
[root@xentos /]# cd $MOUNT_POINT/backup
-bash: cd: /backup: No such file or directory
[root@xentos /]# dir
aquota.group  download                          lib64       opt      sys
aquota.user   e3fb3a43c4d41aed7d3cda2967b625ff  lost+found  proc     tmp
backup        etc                               media       root     usr
bin           home                              misc        sbin     var
boot          installatron_setup.sh             mnt         selinux
dev           lib                               net         srv
[root@xentos /]# cd $MOUNT_POINT/backup
[root@xentos backup]# dir
09-11-10
[root@xentos backup]# dir 09-11-10
apache  bind  custom  mysql
[root@xentos backup]# free -m
             total       used       free     shared    buffers     cached
Mem:          7973       4623       3349          0        244       4030
-/+ buffers/cache:        348       7625
Swap:         9977          0       9977
[root@xentos backup]# free -m
             total       used       free     shared    buffers     cached
Mem:          7973       4603       3369          0        244       4009
-/+ buffers/cache:        349       7623
Swap:         9977          0       9977
[root@xentos backup]# [root@xentos backup]# free -m
             total       used       free     shared    buffers     cached
-bash: [root@xentos: command not found
[root@xentos backup]#              total       used       free     shared    buffers     cached
-bash: total: command not found
[root@xentos backup]# Mem:          7973       4603       3369          0        244       4009
Swap:         9977          0       9977
-bash: Mem:: command not found
[root@xentos backup]# -/+ buffers/cache:        349       7623
-bash: -/+: No such file or directory
[root@xentos backup]# Swap:         9977          0       9977
-bash: Swap:: command not found
[root@xentos backup]# ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0  10352   704 ?        Ss   Sep09   0:01 init [3]
root         2  0.0  0.0      0     0 ?        S<   Sep09   0:00 [migration/0]
root         3  0.0  0.0      0     0 ?        SN   Sep09   0:00 [ksoftirqd/0]
root         4  0.0  0.0      0     0 ?        S<   Sep09   0:00 [watchdog/0]
root         5  0.0  0.0      0     0 ?        S<   Sep09   0:00 [migration/1]
root         6  0.0  0.0      0     0 ?        SN   Sep09   0:00 [ksoftirqd/1]
root         7  0.0  0.0      0     0 ?        S<   Sep09   0:00 [watchdog/1]
root         8  0.0  0.0      0     0 ?        S<   Sep09   0:00 [migration/2]
root         9  0.0  0.0      0     0 ?        SN   Sep09   0:00 [ksoftirqd/2]
root        10  0.0  0.0      0     0 ?        S<   Sep09   0:00 [watchdog/2]
root        11  0.0  0.0      0     0 ?        S<   Sep09   0:00 [migration/3]
root        12  0.0  0.0      0     0 ?        SN   Sep09   0:00 [ksoftirqd/3]
root        13  0.0  0.0      0     0 ?        S<   Sep09   0:00 [watchdog/3]
root        14  0.0  0.0      0     0 ?        S<   Sep09   0:00 [events/0]
root        15  0.0  0.0      0     0 ?        S<   Sep09   0:00 [events/1]
root        16  0.0  0.0      0     0 ?        S<   Sep09   0:00 [events/2]
root        17  0.0  0.0      0     0 ?        S<   Sep09   0:00 [events/3]
root        18  0.0  0.0      0     0 ?        S<   Sep09   0:00 [khelper]
root        91  0.0  0.0      0     0 ?        S<   Sep09   0:00 [kthread]
root        98  0.0  0.0      0     0 ?        S<   Sep09   0:00 [kblockd/0]
root        99  0.0  0.0      0     0 ?        S<   Sep09   0:00 [kblockd/1]
root       100  0.0  0.0      0     0 ?        S<   Sep09   0:00 [kblockd/2]
root       101  0.0  0.0      0     0 ?        S<   Sep09   0:00 [kblockd/3]
root       102  0.0  0.0      0     0 ?        S<   Sep09   0:00 [kacpid]
root       213  0.0  0.0      0     0 ?        S<   Sep09   0:00 [cqueue/0]
root       214  0.0  0.0      0     0 ?        S<   Sep09   0:00 [cqueue/1]
root       215  0.0  0.0      0     0 ?        S<   Sep09   0:00 [cqueue/2]
root       216  0.0  0.0      0     0 ?        S<   Sep09   0:00 [cqueue/3]
root       219  0.0  0.0      0     0 ?        S<   Sep09   0:00 [khubd]
root       221  0.0  0.0      0     0 ?        S<   Sep09   0:00 [kseriod]
root       311  0.0  0.0      0     0 ?        S    Sep09   0:00 [khungtaskd]
root       312  0.0  0.0      0     0 ?        S    Sep09   0:00 [pdflush]
root       313  0.0  0.0      0     0 ?        S    Sep09   0:00 [pdflush]
root       314  0.0  0.0      0     0 ?        S<   Sep09   0:00 [kswapd0]
root       315  0.0  0.0      0     0 ?        S<   Sep09   0:00 [aio/0]
root       316  0.0  0.0      0     0 ?        S<   Sep09   0:00 [aio/1]
root       317  0.0  0.0      0     0 ?        S<   Sep09   0:00 [aio/2]
root       318  0.0  0.0      0     0 ?        S<   Sep09   0:00 [aio/3]
root       460  0.0  0.0      0     0 ?        S<   Sep09   0:00 [kpsmoused]
root       523  0.0  0.0      0     0 ?        S<   Sep09   0:00 [mpt_poll_0]
root       524  0.0  0.0      0     0 ?        S<   Sep09   0:00 [mpt/0]
root       525  0.0  0.0      0     0 ?        S<   Sep09   0:00 [scsi_eh_0]
root       536  0.0  0.0      0     0 ?        S<   Sep09   0:00 [ata/0]
root       537  0.0  0.0      0     0 ?        S<   Sep09   0:00 [ata/1]
root       538  0.0  0.0      0     0 ?        S<   Sep09   0:00 [ata/2]
root       539  0.0  0.0      0     0 ?        S<   Sep09   0:00 [ata/3]
root       540  0.0  0.0      0     0 ?        S<   Sep09   0:00 [ata_aux]
root       546  0.0  0.0      0     0 ?        S<   Sep09   0:00 [scsi_eh_1]
root       547  0.0  0.0      0     0 ?        S<   Sep09   0:00 [scsi_eh_2]
root       548  0.0  0.0      0     0 ?        S<   Sep09   0:00 [scsi_eh_3]
root       549  0.0  0.0      0     0 ?        S<   Sep09   0:00 [scsi_eh_4]
root       550  0.0  0.0      0     0 ?        S<   Sep09   0:00 [scsi_eh_5]
root       551  0.0  0.0      0     0 ?        S<   Sep09   0:00 [scsi_eh_6]
root       562  0.0  0.0      0     0 ?        S<   Sep09   0:00 [kstriped]
root       583  0.0  0.0      0     0 ?        S<   Sep09   0:17 [kjournald]
root       608  0.0  0.0      0     0 ?        S<   Sep09   0:00 [kauditd]
root       641  0.0  0.0  12676   800 ?        S<s  Sep09   0:00 /sbin/udevd -d
root      1624  0.0  0.0      0     0 ?        S<   Sep09   0:00 [kmpathd/0]
root      1625  0.0  0.0      0     0 ?        S<   Sep09   0:00 [kmpathd/1]
root      1626  0.0  0.0      0     0 ?        S<   Sep09   0:00 [kmpathd/2]
root      1627  0.0  0.0      0     0 ?        S<   Sep09   0:00 [kmpathd/3]
root      1628  0.0  0.0      0     0 ?        S<   Sep09   0:00 [kmpath_handle]
root      1695  0.0  0.0      0     0 ?        S<   Sep09   0:00 [kjournald]
root      1697  0.0  0.0      0     0 ?        S<   Sep09   0:00 [kjournald]
root      2123  0.0  0.0  27328   836 ?        S<sl Sep09   0:04 auditd
root      2125  0.0  0.0  81804   800 ?        S<sl Sep09   0:00 /sbin/audispd
root      2219  0.0  0.0   5912   608 ?        Ss   Sep09   0:00 syslogd -m 0
root      2222  0.0  0.0   3808   428 ?        Ss   Sep09   0:00 klogd -x
root      2312  0.0  0.0  10764   376 ?        Ss   Sep09   0:00 irqbalance
rpc       2332  0.0  0.0   8056   572 ?        Ss   Sep09   0:00 portmap
root      2365  0.0  0.0      0     0 ?        S<   Sep09   0:00 [rpciod/0]
root      2366  0.0  0.0      0     0 ?        S<   Sep09   0:00 [rpciod/1]
root      2367  0.0  0.0      0     0 ?        S<   Sep09   0:00 [rpciod/2]
root      2368  0.0  0.0      0     0 ?        S<   Sep09   0:00 [rpciod/3]
root      2377  0.0  0.0  10164   800 ?        Ss   Sep09   0:00 rpc.statd
root      2409  0.0  0.0  55192   760 ?        Ss   Sep09   0:00 rpc.idmapd
dbus      2432  0.0  0.0  21360  1004 ?        Ss   Sep09   0:00 dbus-daemon --s
root      2445  0.0  0.0  10436   788 ?        Ss   Sep09   0:00 /usr/sbin/hcid
root      2451  0.0  0.0   5940   548 ?        Ss   Sep09   0:00 /usr/sbin/sdpd
root      2482  0.0  0.0      0     0 ?        S<   Sep09   0:00 [krfcommd]
root      2527  0.0  0.0  21176  1352 ?        Ssl  Sep09   0:00 pcscd
root      2541  0.0  0.0   3804   576 ?        Ss   Sep09   0:00 /usr/sbin/acpid
68        2554  0.0  0.0  30956  3996 ?        Ss   Sep09   0:00 hald
root      2555  0.0  0.0  21700  1052 ?        S    Sep09   0:00 hald-runner
68        2563  0.0  0.0  12328   844 ?        S    Sep09   0:00 hald-addon-acpi
root      2598  0.0  0.0   8520   484 ?        Ss   Sep09   0:00 /usr/bin/hidd -
root      2625  0.0  0.0  57476  1516 ?        Ssl  Sep09   0:00 automount
root      2715  0.0  0.0 134224  2584 ?        Ss   Sep09   0:00 cupsd
root      2732  0.0  0.0  21648   872 ?        Ss   Sep09   0:00 xinetd -stayali
root      2744  0.0  0.0  65968  1252 ?        S    Sep09   0:00 /bin/sh /usr/bi
apache    2746  0.0  0.0  64920  4340 ?        S    13:52   0:00 /usr/sbin/httpd
apache    2749  0.0  0.0  65032  4100 ?        S    13:52   0:00 /usr/sbin/httpd
apache    2757  0.0  0.0  64908  4508 ?        S    13:52   0:00 /usr/sbin/httpd
apache    2758  0.0  0.0  64936  4332 ?        S    13:52   0:00 /usr/sbin/httpd
mysql     2799  0.0  0.2 142856 21272 ?        Sl   Sep09   0:04 /usr/sbin/mysql
root      3114  0.0  0.0   6456   368 ?        Ss   Sep09   0:00 gpm -m /dev/inp
root      3159  0.0  0.0  74852  1160 ?        Ss   Sep09   0:00 crond
xfs       3182  0.0  0.0  20268  1236 ?        Ss   Sep09   0:00 xfs -droppriv -
root      3207  0.0  0.0  18736   460 ?        Ss   Sep09   0:00 /usr/sbin/atd
avahi     3238  0.0  0.0  23280  1296 ?        Ss   Sep09   0:00 avahi-daemon: r
avahi     3239  0.0  0.0  23152   340 ?        Ss   Sep09   0:00 avahi-daemon: c
root      3267  0.0  0.0  18420   476 ?        S    Sep09   0:00 /usr/sbin/smart
root      3270  0.0  0.0   3796   480 tty1     Ss+  Sep09   0:00 /sbin/mingetty
root      3271  0.0  0.0   3796   480 tty2     Ss+  Sep09   0:00 /sbin/mingetty
root      3272  0.0  0.0   3796   480 tty3     Ss+  Sep09   0:00 /sbin/mingetty
root      3273  0.0  0.0   3796   484 tty4     Ss+  Sep09   0:00 /sbin/mingetty
root      3276  0.0  0.0   3796   484 tty5     Ss+  Sep09   0:00 /sbin/mingetty
root      3278  0.0  0.0   3796   484 tty6     Ss+  Sep09   0:00 /sbin/mingetty
root      3333  0.0  0.1 260024 15792 ?        SN   Sep09   0:00 /usr/bin/python
root      3335  0.0  0.0  12920  1164 ?        SN   Sep09   0:00 /usr/libexec/ga
dovecot   4661  0.0  0.0  38220  2088 ?        S    14:24   0:00 imap-login
dovecot   4662  0.0  0.0  38220  2084 ?        S    14:24   0:00 imap-login
dovecot   4663  0.0  0.0  38220  2084 ?        S    14:24   0:00 imap-login
dovecot   4665  0.0  0.0  38220  2084 ?        S    14:24   0:00 imap-login
dovecot   4667  0.0  0.0  38220  2088 ?        S    14:24   0:00 imap-login
apache    4718  0.0  0.0  64756  3676 ?        S    14:29   0:00 /usr/sbin/httpd
apache    4721  0.0  0.0  64760  3572 ?        S    14:29   0:00 /usr/sbin/httpd
dovecot   6042  0.0  0.0  38204  2084 ?        S    Sep10   0:00 pop3-login
mail      6413  0.2  0.0 112608  3264 ?        S    14:50   0:07 /usr/sbin/exim
mail      6414  0.0  0.0      0     0 ?        Z    14:50   0:00 [exi] <defunct>
mail      6445  0.0  0.0      0     0 ?        Z    14:51   0:00 [exi] <defunct>
mail      6461  0.0  0.0      0     0 ?        Z    14:51   0:00 [exi] <defunct>
mail      6485  0.0  0.0      0     0 ?        Z    14:51   0:00 [exi] <defunct>
mail      6493  0.0  0.0      0     0 ?        Z    14:51   0:00 [exi] <defunct>
mail      6497  0.0  0.0      0     0 ?        Z    14:51   0:00 [exi] <defunct>
mail      6501  0.0  0.0      0     0 ?        Z    14:51   0:00 [exi] <defunct>
mail      6508  0.0  0.0      0     0 ?        Z    14:51   0:00 [exi] <defunct>
mail      6512  0.0  0.0      0     0 ?        Z    14:51   0:00 [exi] <defunct>
mail      6516  0.0  0.0      0     0 ?        Z    14:51   0:00 [exi] <defunct>
apache    6522  0.0  0.0  64760  3568 ?        S    14:51   0:00 /usr/sbin/httpd
root      6740  0.0  0.3 131144 26224 ?        Ss   14:53   0:00 lfd - sleeping
dovecot   7081  0.0  0.0  38220  2088 ?        S    14:54   0:00 imap-login
dovecot   7083  0.0  0.0  38220  2084 ?        S    14:54   0:00 imap-login
dovecot   7096  0.0  0.0  38220  2084 ?        S    14:54   0:00 imap-login
dovecot   7097  0.0  0.0  38220  2088 ?        S    14:54   0:00 imap-login
dovecot   7098  0.0  0.0  38220  2088 ?        S    14:54   0:00 imap-login
dovecot   7099  0.0  0.0  38220  2088 ?        S    14:54   0:00 imap-login
dovecot   7100  0.0  0.0  38220  2088 ?        S    14:54   0:00 imap-login
dovecot   7101  0.0  0.0  38220  2088 ?        S    14:54   0:00 imap-login
dovecot   7102  0.0  0.0  38220  2088 ?        S    14:54   0:00 imap-login
dovecot   7103  0.0  0.0  38220  2088 ?        S    14:54   0:00 imap-login
dovecot   9950  0.0  0.0  38204  2084 ?        S    00:25   0:00 pop3-login
root     10261  0.0  0.0  90136  3340 ?        Ss   15:27   0:00 sshd: root@pts/
root     10263  0.0  0.0  66104  1536 pts/0    Ss   15:27   0:00 -bash
root     11519  0.0  0.0  54592  2252 ?        S    15:32   0:00 /usr/sbin/exim
nobody   11712  0.0  0.0  48720   636 ?        S    15:33   0:00 /usr/local/dire
nobody   11739  0.0  0.0  48720   636 ?        S    15:33   0:00 /usr/local/dire
nobody   11766  0.0  0.0  48720   636 ?        S    15:33   0:00 /usr/local/dire
nobody   11777  0.0  0.0  48720   636 ?        S    15:33   0:00 /usr/local/dire
nobody   11809  0.0  0.0  48720   636 ?        S    15:33   0:00 /usr/local/dire
root     12192  0.0  0.0 110248  3884 ?        Ss   15:35   0:00 /usr/sbin/exim
mail     12193  0.0  0.0 110248  1848 ?        S    15:35   0:00 /usr/sbin/exim
root     12194  0.0  0.0  65632   964 pts/0    R+   15:35   0:00 ps aux
dovecot  16682  0.0  0.0  38204  2084 ?        S    09:16   0:00 pop3-login
dovecot  16683  0.0  0.0  38204  2088 ?        S    09:16   0:00 pop3-login
dovecot  16684  0.0  0.0  38204  2080 ?        S    09:16   0:00 pop3-login
dovecot  16685  0.0  0.0  38204  2084 ?        S    09:16   0:00 pop3-login
dovecot  16686  0.0  0.0  38204  2084 ?        S    09:16   0:00 pop3-login
dovecot  16687  0.0  0.0  38204  2084 ?        S    09:16   0:00 pop3-login
dovecot  16689  0.0  0.0  38204  2080 ?        S    09:16   0:00 pop3-login
dovecot  16747  0.0  0.0  38204  2080 ?        S    09:18   0:00 pop3-login
dovecot  16753  0.0  0.0  38204  2084 ?        S    09:18   0:00 pop3-login
dovecot  16754  0.0  0.0  38204  2084 ?        S    09:18   0:00 pop3-login
dovecot  16755  0.0  0.0  38204  2084 ?        S    09:18   0:00 pop3-login
root     17994  0.0  0.0   1252   320 ?        Ss   09:34   0:00 /usr/local/dire
nobody   18028  0.0  0.0  48720  1400 ?        Ss   09:34   0:00 /usr/local/dire
ftp      18114  0.0  0.0   8804  1068 ?        Ss   09:35   0:00 proftpd: (accep
root     18181  0.0  0.0  64624  4292 ?        Ss   09:37   0:00 /usr/sbin/httpd
root     18215  0.0  0.0  62636  1212 ?        Ss   09:37   0:00 /usr/sbin/sshd
apache   18216  0.0  0.0  64900  4508 ?        S    09:37   0:00 /usr/sbin/httpd
apache   19997  0.0  0.0  65040  4764 ?        S    10:05   0:00 /usr/sbin/httpd
root     22353  0.0  0.0  10344   668 ?        Ss   Sep10   0:00 dovecot
root     22354  0.0  0.0  19456  1504 ?        S    Sep10   0:00 dovecot-auth
dovecot  22382  0.0  0.0  38204  2084 ?        S    Sep10   0:00 pop3-login
dovecot  22383  0.0  0.0  38204  2084 ?        S    Sep10   0:00 pop3-login
dovecot  22384  0.0  0.0  38204  2084 ?        S    Sep10   0:00 pop3-login
apache   25663  0.0  0.0  64908  4548 ?        S    11:38   0:00 /usr/sbin/httpd
dovecot  26686  0.0  0.0  38220  2088 ?        S    11:53   0:00 imap-login
mail     28093  0.0  0.0  54600  1108 ?        Ss   12:17   0:00 /usr/sbin/exim
named    28129  0.0  0.0 184980  4424 ?        Ssl  12:17   0:00 named -u named
[root@xentos backup]#
 
I got almost the same

Code:
server:~# free -m
             total       used       free     shared    buffers     cached
Mem:          7991       7908         83          0        421       5962
-/+ buffers/cache:       1523       6467
Swap:        36863          8      36855

I'm not sure, but I think its safe to say that the number under buffers/cache can be also read as free.

http://sourcefrog.net/weblog/software/linux-kernel/free-mem.html

The short answer is that you should never worry about the amount of free memory on Linux. The kernel attempts to keep this slightly above zero by keeping the cache as large as possible. This is a feature not a bug.
 
i see. thank you for explain was shocked when i saw the usage, thought it was a bug or something.
 
It is the swap you have to be concerned about. If you start swapping a lot, more than 512 MB, then its time for a memory upgrade.
 
Back
Top