Skip to main content

What's using my RAM?

Comments

8 comments

  • GoWilkes
    Just as an update, I'm seeing 100% of my RAM being used all day:
    total used free shared buffers cached Mem: 1024 1024 0 0 0 0 -/+ buffers/cache: 1024 0 Swap: 0 0 0
    I've updated cPanel, MySQL, used tuning-primer.sh to optimize everything, gone through Apache config with a fine tooth comb... nothing. I'm getting the same results after a graceful reboot, too, so I suspect that this is a configuration issue, not an attack. I installed memcached about an hour ago, but so far it doesn't seem to have had an impact. Update: rkhunter found no problems. Update 2: Results of meminfo:
    # cat /proc/meminfo MemTotal: 1048576 kB MemFree: 0 kB Buffers: 0 kB Cached: 0 kB SwapCached: 0 kB Active: 0 kB Inactive: 0 kB HighTotal: 0 kB HighFree: 0 kB LowTotal: 1048576 kB LowFree: 0 kB SwapTotal: 0 kB SwapFree: 0 kB Dirty: 0 kB Writeback: 0 kB AnonPages: 0 kB Mapped: 0 kB Slab: 0 kB PageTables: 0 kB NFS_Unstable: 0 kB Bounce: 0 kB CommitLimit: 0 kB Committed_AS: 0 kB VmallocTotal: 0 kB VmallocUsed: 0 kB VmallocChunk: 0 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 Hugepagesize: 2048 kB
    0
  • GoWilkes
    Another update. Am I right in understanding that "named" is using the majority of my RAM? Is this normal?
    # ps -e -o pid,vsz,comm= | sort -n -k 2 PID VSZ 1782 4068 courierlogger 3226 4068 courierlogger 3235 4068 courierlogger 3243 4068 courierlogger 3251 4068 courierlogger 3227 8280 couriertcpd 3236 8280 couriertcpd 3244 8280 couriertcpd 3252 8280 couriertcpd 5149 9232 gam_server 1181 10644 udevd 22099 11268 ps 1843 11308 mysqld_safe 22003 11440 bash 22047 11440 bash 21972 17120 imapd 21974 17132 imapd 5150 17448 imapd 1783 19200 authdaemond 1784 19200 authdaemond 1785 19200 authdaemond 1 19232 init 3313 21348 crond 3676 22392 atd 3778 31248 cpanellogd - sl 3734 35168 cPhulkd - proce 3757 38976 queueprocd - wa 3305 39368 pure-authd 22044 46468 su 3341 48080 /usr/local/cpan 5220 49844 /etc/authlib/au 3844 49848 /etc/authlib/au 22100 58572 sort 22505 59852 lfd - sleeping 1828 66256 sshd 21986 68816 sshd 22002 68816 sshd 16255 69756 exim 31765 79576 leechprotect 3772 84932 tailwatchd 3749 107520 cpdavd - accept 3303 117244 pure-ftpd 3740 129156 cpsrvd (SSL) - 19756 129288 webmaild - serv 16266 172452 /usr/local/cpan 16270 191068 spamd child 3296 219664 httpd 31771 224304 httpd 31778 224832 httpd 31772 225028 httpd 19716 225160 httpd 31776 225644 httpd 31777 225700 httpd 31770 226228 httpd 31781 226240 httpd 31769 226280 httpd 31780 226284 httpd 31774 226520 httpd 31779 226536 httpd 31775 236012 httpd 31773 236020 httpd 31767 236092 httpd 31768 236108 httpd 1731 249084 rsyslogd 7750 330844 memcached 16275 517076 clamd 3209 1493148 mysqld 1745 1924172 named
    0
  • cPanelMichael
    Hello :) The following post is a good place to start for understanding memory usage: Memory Usage Explained Also, have you contacted your hosting provider to verify the memory usage isn't an issue with the VPS hardware node? Thank you.
    0
  • GoWilkes
    Unfortunately, the server is with GoDaddy, who has ridiculous support: Friday: Diego - Hello and thank you for contacting Server Support. My name is Diego. How can I assist you today? GoWilkes - My server is not responding. I can SSH in, and I can ping the hostname, but WHM and none of the domains are responsive through the browser Diego - let me take a look Diego - one moment Diego - did you check your resource levels? GoWilkes - I can't access WHM, so I don't know how Diego - RAM, disk? Diego - via ssh GoWilkes - Command? Diego - you can run "free -m" for RAM GoWilkes - RAM says used 1024, free 0 Diego - that is your issue right there Diego - you can try reviewing your usage, processes running and services to see what is causing the usage. Diego - or you can also upgrade your plan to get more RAM GoWilkes - As of yesterday everything was fine, so I don't think there's a need to upgrade. There's just something causing a short term problem. How do I restart the server via SSH? Diego - "reboot" Diego - or you can also request a power cycle from the Servers page GoWilkes - Reboot seems to be working. Once it comes back up, I'll try to find what's causing the usage. Thanks for your help. Diego - anytime! Diego - May I assist you with anything else?
    Monday: Diego - Hello and thank you for contacting Server Support. My name is Diego. How can I assist you today? GoWilkes - Hi Diego. My server is showing that 100% of my RAM is being used, and has said this for several days. Even after a graceful reboot, it comes back up immediately with 100% of RAM being used. Diego - one moment please GoWilkes - For your reference: - - - Updated - - - As of right now, I can't access WHM. This is a new issue as of about an hour ago. I get this error:
    Internal Server Error 500 No response from subprocess (whostmgr (whostmgr)): The subprocess exited with status 1 (EPERM).
    I tried rebooting, but that didn't help. I tried all of the solutions I could find, but nothing helps: service cpanel restart /scripts/upcp -force /usr/local/cpanel/scripts/perlinstaller --force Storable (this fails because there's not enough memory) I was going to remove ClamAV, since it's using a lot of memory, but can't find a way to do it outside of WHM. Any suggestions?
    0
  • GoWilkes
    Update. GoDaddy was able to reboot on their end, in a rare showing of support. After the reboot, I was able to get back in to WHM, and remove ClamAV. Using top -c, named and mysql are my top processes:
    22303 named 25 0 1878m 36m 2668 S 0.0 3.6 0:00.21 /usr/sbin/named -u named 20029 mysql 15 0 1131m 159m 6224 S 0.0 15.6 0:08.46 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-err 3523 memcache 18 0 323m 880 524 S 0.0 0.1 0:00.11 memcached -d -p 11211 -u memcached -m 1024 -c 1024 -P /var/run/memcached/memcached.pid -l 127.0.0.1 3247 root 25 0 243m 1496 1056 S 0.0 0.1 0:00.18 /sbin/rsyslogd -i /var/run/syslogd.pid -c 5 24072 nobody 15 0 218m 15m 5644 S 0.0 1.5 0:00.08 /usr/local/apache/bin/httpd -k start -DSSL
    When I stopped MySQL via "service mysql stop", my RAM load immediately recovered:
    # free -m total used free shared buffers cached Mem: 1024 823 200 0 0 0 -/+ buffers/cache: 823 200 Swap: 0 0 0
    I uninstalled "memcached", and free RAM went up to 249. Stopping httpd brought it up to 441. Starting MySQL and httpd back, though (as they're obviously important) took my free RAM back to 0. The results from tuning-primer.sh didn't show anything problems, but I was still able to shrink the VIRT of MySQL from 1131m to 676m by going over each value with a fine tooth comb. I can post my my.cnf file if anyone asks, I just didn't want this to be so long it was unreadable. I was also able to increase available RAM by adding this to named.conf:
    options { directory "/var/named"; max-cache-size 10m; // maximum cache size of 10MB cleaning-interval 15; // clean cache every 15 minutes max-cache-ttl 60; // limit cached record to a 60s TTL max-ncache-ttl 60; // limit cache neg. resp. to a 60s TTL };
    Right now, everything seems to be running fine, with the following result from free -m:
    # free -m total used free shared buffers cached Mem: 1024 935 88 0 0 0 -/+ buffers/cache: 935 88 Swap: 0 0 0
    0
  • bulewold
    Hey, I just got godaddy VPS as well. I think you know about these servers more than I do so this might be that helpful but from my experience working with Cpanel hosting with godaddy (even shared) Basic system + Cpanel takes up about 1G regularly. I had 2G at shared and I have 2G now with VPS, and at all times, about 1G was always being using for doing about nothing! But that number also never goes beyond 1G... so I kinda came to expect it now. From my experience, you might resolve issue by going to 2G package.
    0
  • GoWilkes
    I actually set up this VPS over a year ago, and never even got close to all of the RAM usage. It's deceptive; WHM will show high RAM usage, but when you SSH in and type "free -m" for a real number, you'll see that it's not that much. Unfortunately, GoDaddy no longer offers a 2G package. I'm currently paying $40 /month for this VPS, and upgrading to 4G was another $40! At that point, GoDaddy is no longer cost effective; I could get 2G with twice as much storage from Softlayer for $75, and Softlayer has impeccable support. You guys might want to consider tweaking your configurations, too. You might be able to save a lot of memory that you didn't know was available, and save some money from an unnecessary upgrade.
    0
  • bulewold
    Gowilkes, I just got godaddy 2g package for $40/month. Maybe you need to call in and negotiate. Or open a new VPS and migrate. :)
    0

Please sign in to leave a comment.