By RandomBK
I’m in a situation where I often have a lot of Docker containers - multiple applications, supporting databases, etc. Many of them are memory hungry containers like JIRA, GitLab, and the occasional Minecraft server. However, only a small handful are actually active at the same time, and the vast majority of them sit idle for most of the day. I estimate that out of a typical ~10GB memory usage, only ~2GB are actively being used at any given point in time.
The 16GB plan is out of my price range as a hobbyist, and feels quite wasteful for my use case. However, I have past successes with allocating a large swap area and letting idle applications page out when not being used. For example, would I be allowed to use the 4GB plan and allocate a 10GB swapfile?
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!
I don’t see why not. Based on my understanding of swap, you’re allowed to allocate as much swap as you have on your hard drive and your system is going to allocate memory to swap based on usage, so the least used memory would be stored in swap while your actively used memory is kept in RAM. Seems to me like it would work…
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.