Find the answer to your Linux question:
Results 1 to 4 of 4
Hello everyone, I'm trying to figure out why my server resources are getting drained, but mr google hasn't been much help. I'm running a SLES 10.1 (we cancelled our support ...
  1. #1
    Just Joined!
    Join Date
    Mar 2011
    Posts
    2

    Unhappy Server memory is getting chewed up...help!

    Hello everyone,

    I'm trying to figure out why my server resources are getting drained, but mr google hasn't been much help. I'm running a SLES 10.1 (we cancelled our support before we could upgrade) web server with PHP 5.3.2 and MySQL 5.0.26 serving about 3-4k unique pages a day (so not a lot of activity), yet it consistently has very little memory available, making me have to restart it once every 3-5 days.

    I'm not sure if it's recent changes in some of the web programming, updates to some of the programs I run or what. Restarting apache/mysql doesn't seem to do anything, but restarting the server does (obviously) free up resources.

    I also cannot make any sense of the results from top, I just don't know enough about it to figure out either what is taking up too much memory, or where the bottleneck is.

    Can anyone help out, or point out what processes may be dragging my system down?

    Results from top:
    Code:
    top - 09:47:21 up 1 day, 48 min,  2 users,  load average: 0.23, 0.17, 0.11
    Tasks: 130 total,   1 running, 129 sleeping,   0 stopped,   0 zombie
    Cpu(s):  0.1%us,  0.0%sy,  0.0%ni, 99.9%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
    Mem:   4044608k total,  3906120k used,   138488k free,   225616k buffers
    Swap:  2104472k total,        0k used,  2104472k free,  3362104k cached  
    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                                                                                                                                                      17591 root      15   0  186m  25m  17m S    0  0.6   0:00.46 application-bro                                                                                                                                                                                                                               
    17576 root      15   0  204m  23m  18m S    0  0.6   0:01.16 nautilus                                                                                                                                                                                                                                      17717 root      16   0  206m  23m  18m S    0  0.6   0:03.42 intlclock-apple                                                                                                                                                                                                                               17606 root      15   0  191m  23m  18m S    0  0.6   0:00.23 main-menu                                                                                                                                                                                                                                     
     3977 root      15   0 86800  22m 6512 S    0  0.6   0:30.01 X                                                                                                                                                                                                                                              4172 root      16   0  218m  20m  11m S    0  0.5   0:01.87 httpd2-prefork                                                                                                                                                                                                                                 6065 mysql     16   0  114m  20m 4300 S    0  0.5   0:00.02 mysqld                                                                                                                                                                                                                                        17658 root      15   0  173m  19m  16m S    0  0.5   0:00.13 stickynotes_app                                                                                                                                                                                                                               
    17572 root      16   0  133m  16m  12m S    0  0.4   0:00.22 gnome-panel                                                                                                                                                                                                                                    5918 wwwrun    16   0  219m  14m 4104 S    0  0.4   0:00.14 httpd2-prefork                                                                                                                                                                                                                                17483 root      16   0  104m  14m  11m S    0  0.4   0:00.17 gnome-session                                                                                                                                                                                                                                  5895 wwwrun    16   0  218m  14m 4200 S    0  0.4   0:00.04 httpd2-prefork                                                                                                                                                                                                                                 5885 wwwrun    16   0  218m  13m 3424 S    0  0.3   0:00.00 httpd2-prefork                                                                                                                                                                                                                                
     5900 wwwrun    16   0  218m  13m 3420 S    0  0.3   0:00.01 httpd2-prefork                                                                                                                                                                                                                                 5897 wwwrun    15   0  218m  13m 3352 S    0  0.3   0:00.00 httpd2-prefork                                                                                                                                                                                                                                 5909 wwwrun    16   0  218m  13m 3340 S    0  0.3   0:00.00 httpd2-prefork                                                                                                                                                                                                                                 5893 wwwrun    16   0  218m  12m 3084 S    0  0.3   0:00.00 httpd2-prefork                                                                                                                                                                                                                                 5904 wwwrun    15   0  218m  12m 3008 S    0  0.3   0:00.00 httpd2-prefork                                                                                                                                                                                                                                
     5898 wwwrun    16   0  218m  12m 2644 S    0  0.3   0:00.00 httpd2-prefork                                                                                                                                                                                                                                 5903 wwwrun    15   0  218m  12m 2644 S    0  0.3   0:00.00 httpd2-prefork                                                                                                                                                                                                                                 5886 wwwrun    16   0  218m  12m 2640 S    0  0.3   0:00.00 httpd2-prefork                                                                                                                                                                                                                                
     5896 wwwrun    16   0  218m  12m 2592 S    0  0.3   0:00.00 httpd2-prefork                                                                                                                                                                                                                                 3531 root      15   0  109m  11m 7112 S    0  0.3   0:00.25 owcimomd                                                                                                                                                                                                                                      17558 root      15   0  118m  11m 8972 S    0  0.3   0:00.09 gnome-settings-                                                                                                                                                                                                                               17548 root      16   0 25632  11m 1864 S    0  0.3   0:00.25 gconfd-2                                                                                                                                                                                                                                      17563 root      16   0 60044  10m 8548 S    0  0.3   0:00.15 metacity                                                                                                                                                                                                                                      
    17516 root      16   0 91852  10m 1864 S    0  0.3   0:00.08 scim-launcher                                                                                                                                                                                                                                 17521 root      15   0 75128 8716 6456 S    0  0.2   0:00.03 scim-panel-gtk                                                                                                                                                                                                                                
    17594 root      15   0 92856 7072 4352 S    0  0.2   0:00.01 gnome-power-man                                                                                                                                                                                                                               17595 root      16   0 86288 6016 4336 S    0  0.1   0:00.01 gnome-volume-ma                                                                                                                                                                                                                               17598 root      15   0 43296 5168 4160 S    0  0.1   0:00.00 gnome-vfs-daemo                                                                                                                                                                                                                               
     3631 lp        16   0 26632 4924 1452 S    0  0.1   0:01.58 cupsd                                                                                                                                                                                                                                          4006 ntp       16   0 16012 4876 3724 S    0  0.1   0:00.00 ntpd                                                                                                                                                                                                                                          
     3772 root      16   0 40244 3740 2312 S    0  0.1   0:00.09 smbd                                                                                                                                                                                                                                          17556 root      15   0 21636 3396 2504 S    0  0.1   0:00.01 bonobo-activati                                                                                                                                                                                                                               
     2775 root      16   0 13288 3364 1500 S    0  0.1   0:00.27 hald                                                                                                                                                                                                                                           3648 root      16   0 51156 3184 2564 S    0  0.1   0:00.01 gdm                                                                                                                                                                                                                                           
     3976 root      15   0 63256 3140 2288 S    0  0.1   0:00.07 gdm                                                                                                                                                                                                                                            5729 root      16   0 39668 2724 2116 S    0  0.1   0:00.00 sshd                                                                                                                                                                                                                                          
     5769 john.dee  15   0 10116 2404 1548 S    0  0.1   0:00.02 bash                                                                                                                                                                                                                                           5846 root      15   0  9856 2400 1552 S    0  0.1   0:00.00 bash                                                                                                                                                                                                                                          
    17523 root      15   0 86396 2324  772 S    0  0.1   0:00.00 scim-launcher                                                                                                                                                                                                                                  4094 root      17   0 21328 2188 1728 S    0  0.1   0:00.02 master                                                                                                                                                                                                                                        
     4113 postfix   16   0 21332 2184 1720 S    0  0.1   0:00.00 qmgr                                                                                                                                                                                                                                          32525 postfix   16   0 21296 2084 1648 S    0  0.1   0:00.00 pickup                                                                                                                                                                                                                                        
     3650 root      16   0 20292 1976 1460 S    0  0.0   0:00.00 powersaved                                                                                                                                                                                                                                     5768 john.dee  16   0 39804 1824 1192 S    0  0.0   0:00.05 sshd                                                                                                                                                                                                                                          
     3551 root      15   0 26408 1672 1048 S    0  0.0   0:08.94 nmbd                                                                                                                                                                                                                                           5837 root      17   0 24712 1524 1124 S    0  0.0   0:00.06 su                                                                                                                                                                                                                                            
     3629 root      16   0 30036 1468  944 S    0  0.0   0:00.05 sshd                                                                                                                                                                                                                                           6015 root      25   0  7976 1460 1132 S    0  0.0   0:00.00 mysqld_safe                                                                                                                                                                                                                                   
     3835 root      18   0 39848 1416  376 S    0  0.0   0:00.00 smbd                                                                                                                                                                                                                                           6075 root      16   0  5596 1284  868 R    0  0.0   0:00.18 top                                                                                                                                                                                                                                           
     4035 root      16   0  119m 1124  784 S    0  0.0   0:00.58 nscd                                                                                                                                                                                                                                          17520 root      19   0 14988 1104  784 S    0  0.0   0:00.00 scim-helper-man                                                                                                                                                                                                                               
     2654 messageb  16   0 13164 1096  732 S    0  0.0   0:00.04 dbus-daemon                                                                                                                                                                                                                                    3474 daemon    16   0 12984 1060  724 S    0  0.0   0:00.04 slpd                                                                                                                                                                                                                                          
     3397 root      18   0 10744  944  728 S    0  0.0   0:00.00 xinetd                                                                                                                                                                                                                                        17539 root      16   0 23312  908  500 S    0  0.0   0:00.00 ssh-agent                                                                                                                                                                                                                                     
    17544 root      16   0 10268  896  680 S    0  0.0   0:00.00 dbus-daemon                                                                                                                                                                                                                                   17554 root      18   0  5576  768  640 S    0  0.0   0:00.00 gnome-keyring-d                                                                                                                                                                                                                               
     2596 root      17   0 10092  728  572 S    0  0.0   0:00.00 resmgrd                                                                                                                                                                                                                                        2606 root      16   0  8296  728  448 S    0  0.0   0:00.00 syslog-ng                                                                                                                                                                                                                                     
     4190 root      17   0  3060  704  608 S    0  0.0   0:00.02 mingetty                                                                                                                                                                                                                                      17543 root      16   0  9068  704  552 S    0  0.0   0:00.00 dbus-launch                                                                                                                                                                                                                                   
     4194 root      20   0  3060  692  596 S    0  0.0   0:00.00 mingetty                                                                                                                                                                                                                                       4191 root      18   0  3060  688  596 S    0  0.0   0:00.00 mingetty                                                                                                                                                                                                                                      
     4192 root      19   0  3060  688  596 S    0  0.0   0:00.00 mingetty                                                                                                                                                                                                                                       4193 root      19   0  3060  688  596 S    0  0.0   0:00.00 mingetty                                                                                                                                                                                                                                      
     4195 root      21   0  3060  688  596 S    0  0.0   0:00.00 mingetty                                                                                                                                                                                                                                       1121 root      21  -4  7132  684  332 S    0  0.0   0:00.11 udevd                                                                                                                                                                                                                                         
     3170 root      20   0  6012  680  580 S    0  0.0   0:00.00 hald-addon-acpi                                                                                                                                                                                                                                2630 root      16   0  2888  672  328 S    0  0.0   0:00.00 klogd                                                                                                                                                                                                                                         
     3368 root      17   0  6008  652  552 S    0  0.0   0:00.12 hald-addon-stor                                                                                                                                                                                                                                3203 root      13  -3 12016  644  480 S    0  0.0   0:00.00 auditd                                                                                                                                                                                                                                        
     4125 root      16   0  7096  568  448 S    0  0.0   0:00.04 cron                                                                                                                                                                                                                                           2636 root      16   0  2624  512  412 S    0  0.0   0:00.00 acpid                                                                                                                                                                                                                                         
     3129 nobody    15   0  4712  456  340 S    0  0.0   0:00.00 portmap                                                                                                                                                                                                                                        3712 root      15   0  2676  456  380 S    0  0.0   0:00.00 startpar                                                                                                                                                                                                                                      
     3364 root      16   0  1472  452  376 S    0  0.0   0:00.00 bnx2id                                                                                                                                                                                                                                        17538 root      16   0  8704  444  272 S    0  0.0   0:00.00 gpg-agent                                                                                                                                                                                                                                     
     2625 root      16   0  2640  404  296 S    0  0.0   0:00.00 irqbalance                                                                                                                                                                                                                                     3473 root      18   0  2468  336  272 S    0  0.0   0:57.76 zmd                                                                                                                                                                                                                                           
        1 root      16   0   780  308  256 S    0  0.0   0:01.73 init                                                                                                                                                                                                                                              2 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/0                                                                                                                                                                                                                                   
        3 root      34  19     0    0    0 S    0  0.0   0:00.00 ksoftirqd/0                                                                                                                                                                                                                                       4 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/1                                                                                                                                                                                                                                   
        5 root      34  19     0    0    0 S    0  0.0   0:00.00 ksoftirqd/1                                                                                                                                                                                                                                       6 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/2                                                                                                                                                                                                                                   
        7 root      34  19     0    0    0 S    0  0.0   0:00.00 ksoftirqd/2                                                                                                                                                                                                                                       8 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/3                                                                                                                                                                                                                                   
        9 root      34  19     0    0    0 S    0  0.0   0:00.00 ksoftirqd/3                                                                                                                                                                                                                                      10 root      10  -5     0    0    0 S    0  0.0   0:00.00 events/0                                                                                                                                                                                                                                      
       11 root      10  -5     0    0    0 S    0  0.0   0:00.00 events/1                                                                                                                                                                                                                                         12 root      10  -5     0    0    0 S    0  0.0   0:00.00 events/2                                                                                                                                                                                                                                      
       13 root      10  -5     0    0    0 S    0  0.0   0:00.00 events/3                                                                                                                                                                                                                                         14 root      16  -5     0    0    0 S    0  0.0   0:00.00 khelper                                                                                                                                                                                                                                       
       15 root      10  -5     0    0    0 S    0  0.0   0:00.00 kthread                                                                                                                                                                                                                                          21 root      10  -5     0    0    0 S    0  0.0   0:00.00 kblockd/0                                                                                                                                                                                                                                     
       22 root      10  -5     0    0    0 S    0  0.0   0:00.00 kblockd/1                                                                                                                                                                                                                                        23 root      10  -5     0    0    0 S    0  0.0   0:00.00 kblockd/2                                                                                                                                                                                                                                     
       24 root      10  -5     0    0    0 S    0  0.0   0:00.00 kblockd/3                                                                                                                                                                                                                                        25 root      11  -5     0    0    0 S    0  0.0   0:00.00 kacpid                                                                                                                                                                                                                                        
      179 root      20   0     0    0    0 S    0  0.0   0:00.00 pdflush                                                                                                                                                                                                                                         180 root      15   0     0    0    0 S    0  0.0   0:19.23 pdflush                                                                                                                                                                                                                                       
      181 root      15   0     0    0    0 S    0  0.0   0:00.05 kswapd0                                                                                                                                                                                                                                         182 root      10  -5     0    0    0 S    0  0.0   0:00.00 aio/0                                                                                                                                                                                                                                         
      183 root      10  -5     0    0    0 S    0  0.0   0:00.00 aio/1                                                                                                                                                                                                                                           184 root      10  -5     0    0    0 S    0  0.0   0:00.00 aio/2                                                                                                                                                                                                                                         
      185 root      11  -5     0    0    0 S    0  0.0   0:00.00 aio/3                                                                                                                                                                                                                                           410 root      10  -5     0    0    0 S    0  0.0   0:00.00 cqueue/0                                                                                                                                                                                                                                      
      411 root      11  -5     0    0    0 S    0  0.0   0:00.00 cqueue/1                                                                                                                                                                                                                                        412 root      10  -5     0    0    0 S    0  0.0   0:00.00 cqueue/2                                                                                                                                                                                                                                      
      413 root      11  -5     0    0    0 S    0  0.0   0:00.00 cqueue/3                                                                                                                                                                                                                                        414 root      10  -5     0    0    0 S    0  0.0   0:00.00 kseriod                                                                                                                                                                                                                                       
      446 root      10  -5     0    0    0 S    0  0.0   0:00.00 kpsmoused                                                                                                                                                                                                                                       840 root      10  -5     0    0    0 S    0  0.0   0:00.00 scsi_eh_0                                                                                                                                                                                                                                     
      904 root      10  -5     0    0    0 S    0  0.0   0:00.00 ksnapd                                                                                                                                                                                                                                          915 root      11  -5     0    0    0 S    0  0.0   0:00.00 ata/0                                                                                                                                                                                                                                         
      916 root      11  -5     0    0    0 S    0  0.0   0:00.00 ata/1                                                                                                                                                                                                                                           917 root      10  -5     0    0    0 S    0  0.0   0:00.00 ata/2                                                                                                                                                                                                                                         
      918 root      10  -5     0    0    0 S    0  0.0   0:00.00 ata/3                                                                                                                                                                                                                                           919 root      11  -5     0    0    0 S    0  0.0   0:00.00 ata_aux                                                                                                                                                                                                                                       
     1032 root      10  -5     0    0    0 S    0  0.0   0:00.15 reiserfs/0                                                                                                                                                                                                                                     1033 root      10  -5     0    0    0 S    0  0.0   0:00.46 reiserfs/1                                                                                                                                                                                                                                    
     1034 root      10  -5     0    0    0 S    0  0.0   0:01.06 reiserfs/2                                                                                                                                                                                                                                     1035 root      10  -5     0    0    0 S    0  0.0   0:00.64 reiserfs/3                                                                                                                                                                                                                                    
     1812 root      10  -5     0    0    0 S    0  0.0   0:00.00 khubd                                                                                                                                                                                                                                          1879 root      20   0     0    0    0 S    0  0.0   0:00.00 shpchpd_event                                                                                                                                                                                                                                 
     3205 root      10  -5     0    0    0 S    0  0.0   0:00.00 kauditd

  2. #2
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,695
    Why would you restart the server? Was there an error you were addressing?

    There are many discussions like this one about "memory usage." Google will also return lots of information about Linux memory management.

    In short, your post doesn't show any issues:

    Code:
    Mem:   4044608k total,  3906120k used,   138488k free,   225616k buffers
    Swap:  2104472k total,        0k used,  2104472k free,  3362104k cached

  3. #3
    Just Joined!
    Join Date
    Mar 2011
    Posts
    2
    Thanks for the quick response HROAdmin26.

    I had done a bunch of searching and reading but nothing was leading me to a good answer, which is why I decided to post to get some direct clarification.

    I have to restart my server because everything eventually locks up. I cannot view the website, I cannot ssh, vnc or anything to the server. Only restarting it allows access again.

    And, if I understand you correctly, what I'm looking at in top is not showing that out of 4gb of memory, 3.9gb is being used and I only have 138mb of memory free?

  4. #4

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...