Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

By matt350926
Hi, all–
I recently opened an account here and have created my first (512MB) droplet, running Arch Linux.
I’ve been using Arch for about 7 years on my desktop & laptops, but have never had occasion to look in depth at which processes use how much memory (except in the case of misbehaving apps); this is my first time using Arch on a VPS.
Anyway, I’m exploring the system and getting some services set up, and I took a look at the memory usage; I was surprised to find that ‘free -m’ shows 422 of 494 M in use, and that is with virtually no services running. I also checked ‘top’; the total memory usage figure is consistent with ‘free’, and there is no single process consuming large amounts of memory (the biggest is systemd at 0.618; most processes are shown at 0.000).
Then if I start nginx, mariadb, postfix, and php-fpm, all of which I am going to need, available RAM shrinks to about 8MB. It is looking like I will not be able to do any real work with this server configuration. I have created a swap file, but for the usual reasons I’d prefer to keep swap usage at a minimum.
So, what I’d like to know is:
Can I trust the numbers I’m getting from ‘free’ and ‘top’? Seems like I’ve heard those commands aren’t always accurate on a VPS.
Is there a better way to check my memory usage?
I can certainly look over all my running processes and turn off any that I don’t need … but the ‘top’ output suggests that isn’t going to do much. Are there any simple ways people have found to reduce memory usage?
Thanks for any tips!