By eskimo10
My Droplet (512 MB Memory, LAMP, Ubuntu 16.04) uses 70%+ of it’s memory since I created it, even when I’m not running the application.
When I stop running my app, I can see the memory usage drop by 10 to 15%, but it’s still consistently high. I have a firewall setup so only my and a colleagues IP have access to the app.
In the Graphs section of the Droplet I can see the following processes consuming the most energy (high to low): apache2: 48% mysqld: 29% fail2banserver: 2.8%
All the other processes after that don’t contribute significantly (less than 2%).
I’ve read this post, and if I run free -m I get:
total used free shared buff/cache available
Mem: 488 347 22 16 118 94
Swap: 0 0 0
So it looks like the RAM really isn’t available. How can I figure out what’s going on?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
If you are concerned about memory usage you can use top to see which specific processes are using exactly how much RAM. The output you provided here from free only lists the totals which isn’t very useful for troubleshooting.
There’s a tutorial on reading output from top here: https://www.digitalocean.com/community/tutorials/how-to-use-top-netstat-du-other-tools-to-monitor-server-resources#top
After you review your usage you can decide that if something is using a lot of RAM and not needed to disable it.
But if you are running a lamp configuration you will have Apache, php, MySQL running, and then you can see which one of them is taking up the most resources.
Also note that if the server isn’t under any load and using 30% memory, it doesn’t mean that your RAM usage will immediately spike if you start to receive traffic, as a lot of the processes are just sitting there idling and waiting to process a request.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.