Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a website and we bought some advertisement on neobux.com. We bought 1000 views hoping to get more users on the website. We have a VPS with 1gb ram and 1gb burstable running apache. When we started our add on the website we got around 1000 views in less than 1 minute. As we see other wites can handle this sort of traffic but not ours. Is there some sort of fix how we can view this because this sort of advertising is needed to run the website. What it now does when we activate the website it just loads very very slow and eventually goes to a blank screen. We don't have static pages because it is up to the user to advertise our website to get more referrals. We are running a Pay to Click script.

Could anyone help?

share|improve this question
7  
Apache can handle 1000 page loads per minute on 10-year-old gear. More information needs to be provided, such as: What is the CPU/memory usage? Is there anything else running on the server? What language is the site coded in? Is there a DB on the backend? Have you run any sort of page load analysis like the ones on code.google.com/speed/tools.html ? As it is, this question is unanswerable, since all it really says is "Apache is slow. Help me make it faster" –  Hyppy May 11 '11 at 19:13
    
We have php installed on the apache, mysql too. The website runs on php with jquery and ajax however the source is encrypted with zend so we are running zend optimizer with php. –  damage000 May 11 '11 at 19:38

3 Answers 3

up vote 6 down vote accepted

Wow - what can I say, this stuff isn't easy is it? but have no fear, nobody is born just knowing this stuff so don't feel bad about it, well not yet anyway.

Ultimately this comes down to three main areas;

  1. Knowing your likely target audience - this is looking at what the max/ave/min number of users you're likely to see over a given day/week/month is. It's predominantly a task for your marketing people but you also need to understand the typical load than an average user is going to place on your environment. As an example you may be able to deduce that you might see 1000 x 100KB views per minute during 0900-1700 hours dropping to 100 per minute outside that time or similar.
  2. Designing the system - this is the actual designing of an end-to-end environment to support these requirements. Firstly you need to understand the data flow and volume of each of these average user interactions, firstly on your web services, then on your applications, then on your databases and then back the other way - generally you end up mapping out the workflow in a 'story' showing what actually happens for each user. Once you understand the nature of each user interaction you can create a Proof Of Concept environment to figure out how much CPU, memory, disk IO, disk capacity and network IO each typical user interaction will require. Once you have proved these technical requirements you can extrapolate the load requirements by the expected loads and begin the design of your production environment scaled to the correct levels for each of these resources.
  3. Build, test and tune the environment - this is where you'll actually create the various tiers/applications that you'll go into production with. There will be lots of differing skills, from scaling design to networking, OS management, application creation, storage management, security auditing, testing and eventually in-life support.

The great thing though is if you carry out these steps you'll end up with a platform that will perform according to requirements!

share|improve this answer

There are two main things that determine how much traffic a server can handle:

  1. Server Power -- Obviously a bigger server means more serving capacity. A VPS will likely be on the "low" end of the serving scale.
  2. Content Type -- What you are serving has a significant impact on how much you can serve. You can server orders of magnitude more static 1kb images than you can a complex and unoptimized PHP/MySQL application.

Similarly, if you want a "faster" web site there are two main things you can do. You can get a better server (either a bigger one and/or more of them) or you can optimize your application (PHP op-code cache, optimized settings, caching layers, etc...). The former is generally easy to do but expensive while the latter can be much harder but get you farther in the long run. Be warned that a poorly designed application can bring even a huge server down.

What you do now really depends on your situation. In some cases it can be better to spend the money and upgrade to an over-speced server and then worry about proper application optimization later.

share|improve this answer

First thing would be to check that the server actually is hitting it's resource limits, apache and mysql both have default simultaneous connection limit settings that you may need to modify.

Using htop (assuming you're on a linux machine) is quite an easy way to get some basic info about the resource usage and processes running on your VPS.

Then you can check it is the server causing the bottleneck rather than configuration limitations and either increase server resources from your host or check over the site to see if you can optimise it any further.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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