Re:Digital Ocean Secretly Wants You to Switch to Larger Drop...
by cuu508 on Friday January 31, 2014 @09:53AM
(#7156895)
I prefer having swap disabled by default and hitting the wall hard when out of memory.
Some swap is nice on desktop systems where memory usage can vary a lot. On server, RAM usage should be relatively stable. Tune your stack, pick appropriate plan that leaves some RAM headroom, and be done with it. Ah, and add alerts for when memory usage goes over some threshold.
[ Parent
| on HN ]
Re:Digital Ocean Secretly Wants You to Switch to Larger Drop...
by josephlord on Friday January 31, 2014 @10:06AM
(#7156980)
Server memory usage may be stable but there are likely to be some cold spots that rarely (maybe never) actually get accessed so having a some swap space should have very little negative performance impact and give you a little more headroom before you hit the limit and processes start dying on you.
If you hit the point when it thrashes because the working set isn't fitting in memory then that is obviously a bad place but there is a fair chance you can stay a host size smaller and save money by running some swap.
As for what the cold spots might be I can easily imagine libraries being included/required in an interpreted language and only small fractions of their functionality used. Unlike native libraries they won't just be memory mapped in without using real memory.
Re:Digital Ocean Secretly Wants You to Switch to Larger Drop...
by breakall on Friday January 31, 2014 @09:58AM
(#7156929)
This makes sense! Can you give a pointer on how to set up the alerts you mentioned? (home sysadmin here)
Re:Digital Ocean Secretly Wants You to Switch to Larger Drop...
by cuu508 on Friday January 31, 2014 @10:44AM
(#7157201)
I'm using NewRelic's free plan for this.
Instructions for setting up their monitoring daemon on Ubuntu server: https://docs.newrelic.com/docs/server/server-monitor-install...