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 user40980, user53019, Kilian Foth, Bart van Ingen Schenau, amon Feb 19 '14 at 16:16

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    Unless you're serving more than 10,000 hits per day (7-8 per minute) then most of these answers will be overkill. Build your site first, make it popular, then you'll have plenty of time to worry about making it fast (and you should be able to monetize 10,000 hits per day in order to pay for all of this, too...) – Dean Harding Nov 22 '10 at 22:52
  • 1
    I don't think the RAM issue is overkill. With not enough RAM your site will run like a dog with only 1 visit per day. – Craig Nov 22 '10 at 23:00
  • I think it's all about software. RAM is great but if you're using apache for static files it just eats all the ram. Caching can speed things up by several orders of magnitude. – Keyo Nov 25 '10 at 2:36
  • To speed up website loading time try to focus on reducing data size of images and use intelligent methods of generating bigger image by using smaller elements to reduce net size of these images. Another way to reduce load time and to speed up is use gzip compression as many new browsers support it. Other then that after certain traffic the server configuration and other server and network resources will start to act as bottleneck! – Akshay Jan 5 '13 at 19:22

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.

Static Files: Put static files on another domain and don't use cookies. You could use static.mydomain.com. It helps to serve these with a light weight server like nginx, this will cut RAM usage a lot.
A CDN is an easy option for this. 0.1 seconds is considered to be fast in usability. I'm in Australia so you've probably lost me no matter how fast you serve up the files.

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.

  • Awwww...these poor little database schema is getting demoralized :( Maybe we you denormalize it to help his moral ;-) – Martin Nov 22 '10 at 22:47
  • Added a couple of videos. – Keyo Nov 23 '10 at 2:51

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.

  • sorry what do you mean by processing power? – Goma Nov 22 '10 at 21:10
  • IS CPU with windows hosting more expensive than with linux or is it the same? – Goma Nov 22 '10 at 22:02
  • 1
    I think CPU is largely irrelevant. Most web applications are disk or RAM bound. Unless you are doing a lot of image/video processing it probably won't matter much. – Keyo Nov 22 '10 at 22:36

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 amount of data
  • The speed of the transfer
  • Server response time
  • Number of requests

The factors that makes a site seem to load faster are more complex, some important are:

  • Loading what's needed for initial display before the rest of the data
  • A page layout that needs minimal data for the initial display
  • Placeholders for content (e.g. images), so that the layout doesn't change much when content loads
  • Reaching UI responsiveness early
  • +1 for covering "seeming". This is generally more important from a user's perspective. – Inaimathi Nov 23 '10 at 14:30

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.

  • 1
    And what else? :) – Goma Nov 22 '10 at 21:13
  • Um, how many cores are on the machine, the speed of the cores, the number of VPS sessions, the number of concurrent website users, etc. – Robert Harvey Nov 22 '10 at 22:16

RAM is most important but you also look at things like using a CDN for scripts on your site such as jQuery to remove the load from your server serving them and make sure everything (css/javascript/images) is compressed as much as possible.


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.

  • taking all thes in acount then LAMP will much much cheaper than .net, am I right or with large applications there is no big diffeence? – Goma Nov 22 '10 at 22:00
  • The only cost difference would be OS + Database licenses for Windows and SQLServer. Availability of skills would have to be a consideration, but if you've got LAMP admins around already, then yes, LAMP is likely cheaper. MySQL doesn't seem to be free any more since Oracle bought them, so you need to factor that in. – JBRWilkinson Nov 23 '10 at 0:14

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.