Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a single blade server to work with (8 CPUs, decent bandwidth, running apache). Users will be connecting to the server to download a single file (either the 5mb or the 70mb version). What can I do to make the server not melt under the load?

The users will first access a PHP file which will determine if they can access the file or not, and if the script passes then they will download the file. I'm just wondering what I can do to make sure that not all the slots fill up and people end up getting timeouts.

I'm anticipating max 10,000 downloads a day. Would a decent blade server be able to handle this?

share|improve this question

Firstly it's irrelevant whether it's a blade server or a regular 'pizza-box' server, especially with such a straightforward use-case.

In this particular case having 8 cores is enormous overkill as this application will be 98%+ IO-bound.

Basically there's only two things you can do to make this faster; increase your IO speed (by say moving from 1Gb NICs to 10Gb ones) and ensuring the file is always in cache, unless your PHP code is particularly badly-written it'll barely register on more than a single core.

share|improve this answer
So what you're saying is I will be mostly limited by my bandwidth and the type of NIC I am using right? – Daisetsu Jan 31 '11 at 19:10
Yes, unless your code is nightmarishly bad – Chopper3 Jan 31 '11 at 19:14
No io limit. Seriously. 75mb total in files (1x5mb, 1x70mb) can be hold in memory on the application layer and served out of memory. – TomTom Jan 31 '11 at 19:20
The PHP will stream the file or just point to a URL to download the file? Remember to tweak your number of processes or threads that will serve that. Each download will use one of those and even that the download time is small you can hit the maximum limit pretty easily if everyone tries to get the file at the same time. – coredump Jan 31 '11 at 19:58

The way to "best" handle a single static file would be to serve that file from RAM.

I would recommend keeping the "real" copy on disk and during boot create a RAM disk and copy the files to it. Any time the "real" copy is updated, copy it to the RAM disk too.

share|improve this answer
RAM disk is no faster than 'real' disk when the data is hot and fully cached – Javier Jan 31 '11 at 21:45
Yes, but you can't count on the data always being hot and fully cached. – bahamat Jan 31 '11 at 21:50
when it's so much smaller than RAM, if it's not cached, it's not hot. – Javier Feb 6 '11 at 14:49

Your Answer


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.