I want to know what aspects in VPS hosting packages are related to performance for the website which will make it faster in loading for the end useres. And does RAM really matter?
closed as too broad by MichaelT, GlenH7, Kilian Foth, Bart van Ingen Schenau, amon Feb 19 '14 at 16:16
There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.
In my experience RAM makes more difference with databases/datastores than with webservers.
Unless you have a complex web application, go for processing power since that would impact performance more than memory!
Edit> I base my experience working with seperate web- and database servers. The web server hardly used any memory while the database server had to be configured so that the RAM basically was a RAM-disk.
With processing power I mean what CPU you are using; processing speed, number of cores. If you have a database on the same VPS then you can consider to add more RAM since that would impact it's performance.
If you're starting out, it really doesn't matter anyway because you need the traffic first anyway. Only when the site is becoming slow and unresponsive is when you should worry about optimization.
RAM matters hugely.
The usual suspects apply: how many cores are on the machine, the speed of the cores, the number of VPS sessions, the number of concurrent website users, etc.
I would guess that more RAM is probably the most significant first thing you can do to increase performance. RAM affects your ability to cache, your ability to serve pages; RAM affects everything.
There are hardware and software aspects:
Hardware: A starting point is going to be a single server with capable hardware - lots of RAM, multi-CPU system, high performance disks, multiple disks (separate OS, swap and data disks), multiple network cards (lots of incoming connections). Once you're beyond one large machine, you're going to be looking at multiple machines and load balancing solutions. Splitting out the database to a separate server with tons of RAM will help to a degree, but you'll soon need to add additional web servers.
Where to invest depends on your web application and its' usage profile - measure the performance, response, utilisation, etc, and scale accordingly.
After this, you're going to be looking to spread servers around the globe, perhaps leveraging Content Distribution Networks to capitalise on their setup first.
Software: Proper server caching settings for the pages you serve will make a massive difference to your users and your bandwidth costs. Modern web browsers can cache all the JS and images that your site has. If you can structure your site to be as cache-able as possible, with the least number of dynamically-built pages, the better.
Use the Developer Tools in your browser to explore a popular site and see how they achieve great response.
Here are the main ones in order of best improvement for time spent. Some of these will be more of a bottleneck depending on what data you're dealing with.
Front End: There are easy wins on the front end. Cut down the number of requests with image sprites and aggregating css/js files. Make sure gzip and cache headers are being used.
Hardware: Hardware can be cheap compared to your time. Throw more ram at the problem. Perhaps put your database on another server to cut down disk io.
Server side caching: Setup a reverse proxy, it's much more efficient to have Nginx serving pages to slow mobile connections than have a heavy apache process waiting idle for the response to finish.
Memcached is an easy way of caching things in memory for fast retrieval.
Database Tuning: Keep track of what queries are running slow. Add indexes on the columns you are using. Cut down the number of joins by denormalising where appropriate. You'll need to put the database on a second server at one stage. A lot of RAM can help as the indexes can then be kept entirely in RAM.
If you're interested in clustered hosting I would look at some of the presentations from facebook and youtube, wikipedia engineers on how they've done it.
edit some videos: Youtube scaling: http://video.google.com/videoplay?docid=-6304964351441328559# Django/General Scaling workshop: http://python.mirocommunity.org/video/1689/pycon-2010-django-deployment-w
Also one thing I may have forgot was if you have search a dedicated search engine like Solr/Sphinx can help.
That varies hugely depending on what you are going to run on the server.
For a web server you only need a reasonable amount of RAM, it doesn't make a big difference to use more. For a database server more RAM is better, there is really no upper limit until you have room in memory for caching all data in the databases and all common results.
The factors that makes a site load faster are generally:
The factors that makes a site seem to load faster are more complex, some important are:
you can also use a tool like https://developers.google.com/speed/pagespeed/insights
which will tell you how to opertimize you site to preform faster