Memory
Memory Sort
commands like top, M
or ps
can provide useful info about your memory hogs:
ps aux --sort -rss | head -11
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
mysql 857 0.2 8.0 1537664 163720 ? Ssl Apr26 73:17 /usr/sbin/mariadbd
www-data 1128088 0.1 5.9 250580 120720 ? S 11:39 0:00 /usr/sbin/apache2 -k start
www-data 1128090 0.2 5.9 253720 120040 ? S 11:39 0:00 /usr/sbin/apache2 -k start
www-data 1128095 0.1 5.9 327036 119872 ? S 11:39 0:00 /usr/sbin/apache2 -k start
www-data 1128278 0.0 5.7 323836 116228 ? S 11:40 0:00 /usr/sbin/apache2 -k start
www-data 1128089 0.0 5.6 249776 114288 ? S 11:39 0:00 /usr/sbin/apache2 -k start
root 355 0.0 5.5 171420 111292 ? S<s Apr26 0:40 /lib/systemd/systemd-journald
root 1100119 0.0 2.0 242828 40504 ? Ss 00:27 0:05 /usr/sbin/apache2 -k start
root 600015 0.0 1.7 949640 35884 ? Ssl May06 0:42 /usr/lib/snapd/snapd
root 393 0.0 1.3 289312 27100 ? SLsl Apr26 3:08 /sbin/multipathd -d -s
Memory/Swap Space
free -m
to check swap space usage. If you are using swap space much at all, you are running out of memory. If you do not have a swap drive, then your server will crash when it hits it’s memory limits.
cat /proc/meminfo
Shows good info about various aspects of memory usage