3

How much ram do you generally need in a Linux server? I'm already using 70% out of 2GB on my LAMP stack, and I'm planning to deploy my website prototype to show off in interviews next year. Is 8-16GB of EEC RAM a better option for future proofing? The only thing holding me back is I don't plan to make money on this server in the immediate future so I'm trying to weigh the pros and cons. 🤔

This CentOS server runs on CLI only so the GUI isn't a factor. Eventually I'll have it host Java Spring API's which will easily take up what RAM I have left. On top of that I have 10 db on mySQL so that's another likely culprit.

Comments
  • 3
    Depends on the app(s) running on the server. If the machine is serving as a prod I'd rather get a couple more 2GB servers and run apps separately rather than all-in-one. It's because of both security and redundancy. One powerful machine would be a good choice for an app that needs a loooot of ram. Test your spring api, estimate avg ram requirement per-request, estimate amount of paralel requests you might have to serve and reserve Xmx/server ram accordingly
  • 3
    It really depends on the services that you're running on it, and the amount of traffic it'll receive (high traffic servers may benefit from serving certain stuff directly from RAM). Servers these days are often virtualized though, so for your physical host it's simply a matter of "the more, the merrier" because coupled with many cores (or the assumption that your VM's aren't expected to take 100% CPU time very often, which usually they don't) you'll be able to run more VM's in it. Usually I start with 512MB for a VM and if it starts to swap often, I take down the VM, add some extra (virtual) RAM to it and boot it back up.
  • 1
    i have a vm with centOS, 8 DBs on mariadb, an apache serving 8 projects (not DB intensive), jenkins building\testing\deploying the stuff (nodejs\angular and php\angular, average 60-80 builds per day) and some utilities services like wiki, rdp just in case, admin panels etc.

    no git server on the machine

    4GB of ram is fine, but on occasion it has to swap tho, especially if someone is loggin in with graphic session.

    in these cases, ram thing is mostly up to the DB, memory consumption of the rest is pretty low, constant and predictable.
  • 4
    @thatsnotnice Wait.. there's actually people that use GUI's on servers?! Kill -9 it before it lays eggs!!!
  • 1
    @netikras Good advice. I'll run some benchmarks once I'm close to production ready.
  • 1
    @Condor you're pouring salt into a wound...

    there are a lot of ppl here that know no shit about cli, ssh and unix/linux in general. ( ಠ ʖ̯ ಠ)
  • 2
    @thatsnotnice 😰 for real?
Add Comment