How much memory Magento consume and when does it release the RAM?
I installed Magento 2.1.8 (lastest version) with sample data on my VPS. My VPS initially had 512Mb. After installation, the home page can be loaded couple of times and crashed completely, mysql service was terminated because of ran out of RAM so upgraded my VPS RAM to 2Gb.
When I ran the commandfree -mto check how much memory had been used and how much was still available. The first time I checked, it was around 300Mb used but I saw that memory kept adding up each time the page loaded, it added more if I add some items to cart and it never went down. Now it is 825Mb. If I reload the page, it is gonna add more.
There is no traffic at all, just only me testing some basic function on the page. I'm wonderring why it consumes too much RAM and why it never releases any RAM. Will it will release the RAM when reach a certain amount of RAM or just build up like this?
I don't know what your setup is but RAM will be needed for all services being used, e.g. MySQL, PHP, Redis? and webserver (could be php-fpm + nginx). These will all recover memory as they can and you can do some configuration to optimise memory usage but it's unlikely you're going to need to do this if you're just setting up.
---- If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!