How Much RAM Does Your Dedicated Server Need?
Advertisement: Save 50% off your first month when you sign up for Virtual Machine in the cloud at eApps with promo code SAVE50PERCENT.
How much RAM do I need for my dedicated server? This question pop ups often in various webmaster forums by webmasters starting a new website or moving an existing one from the shared hosting account to the virtual private server or dedicated server. It is hard to give straight answer because there are too many factors to take into account - so it is very case specific. The amount of RAM that you need is directly tied to what you are planning to host. As a general rule of thumb, you can never have too much RAM, but you can certainly have not enough RAM. It is recommended to monitor processes to see which consume too much memory and to optimize every part of your setup for better performance. Before your site is alive and working, it's tough to make a determination about the minimum amount of RAM you need - but you must start somewhere, so let's check some factors that will give you a good "jumping off point":
- Traffic - The number of hits, page views and unique visits are the main variable to take into account. Obviously, if there is going to be a lot of traffic through your website, you'll need more RAM; inversely, less traffic requires less RAM.
- Operating system - To run Windows Server you'll need at least 512MB RAM, with recommended 1GB for Windows Server 2003 and recommended 2GB for Windows Server 2008. For Linux based server, 64MB RAM will be enough, or even less depending on a choice of a distro.
- Static or dynamic site? Scripts and databases are memory hogs. If you use PHP or other scripting language and SQL databases then you need more RAM. How you use them and the size and the number of the databases will largely influence amount of RAM needed for site to function.
- Content management systems - usage of Drupal, Wordpress, Joomla and other CMSs will result in need for more RAM. There might be slight differences in memory usage between various CMSs, but the main factor here is how many and which additional plugins/modules are installed and used. The other important factor is the number of logged in/authenticated users in any given time - their hits consume much more memory than those of anonymous users.
- Do you use control panel? Control panels can be resource hog too, some of them less some of them more. Check this control panels comparison table for more info.
- What other applications run on the server - email clients, antivirus, firewall, email spam protection will also make a difference in the amount of RAM you require.
- Caching - if a large part of your site is set to be cached by proxy servers and browsers - that will significantly improve performance and decrease ram usage. Some static content that doesn't change too often should be always cached. (such as images, css, and js). On Apache server you can use .htaccess to control caching.
So, with all this in mind lets start a "guessing game", how much RAM do I need?
- Linux OS
- Apache web server
- SQL database like MySQL or PostgreSQL
- Scripting Language like PHP
- Content management system like Drupal, Joomla or Wordpress
- Antivirus software like ClamAV
- Email server and web mail client like Open Webmail or Squirrelmail
- FTP server with SSH supported like Proftpd
- "Light" control panel like Webmin or DirectAdmin
If you have no traffic or very low traffic on a setup like this, you'll probably be fine with 512MB RAM.
If you have 200 000 monthly visits and 500 000 page views you'll need at least 1GB RAM.
If you have more than 1 000 000 monthly visits and more than 2 000 000 page views you'll need to upgrade to 4GB or more.
Take this advice only as a starting point; as I already said this was a "guessing game". The actual amount of memory that will be required by your website will vary on your site setup, optimization of every piece of software on your server and number of logged in users. If you plan to have more than one site on a server, things will get even more complicated. Feel free to post question in comments about estimated RAM consumption for any particular setup and we will try to answer it.
Some more tips:
- It is easy to upgrade RAM, so you can start your project with lower and buy more when needed.
- Before going live you can use load testing tools like LoadImpact or similar to examine system behavior under working load.
- Optimize Apache, SQL, PHP, CMS for better performance
- Set up caching for better performance
- Have You Optimized Your Website for Speed Yet? You Should
- LiteSpeed Web Server: A Lightweight, High-Performance Alternative to Apache
- Free Web Page Speed Testing and Optimizing Tool
- Speed Up Your Site: eAccelerator Review
- Google Releases Open Source Server-Side Optimization Module
- Best Tools to Analyze and Optimize Loading Times
- Google's Optimization Plug-in for Firefox: Page Speed
- The Power Behind the eApps Cloud - Our Hosting Provider