Optimal server configuration?
Hochmania - January 16, 2008 - 19:07
I'm looking to build a web server that will serve out just Drupal for a few hundred (if not thousand) users. They won't all be on at the same time, but in theory there will be that many accounts on there. What kind of server specs should I be looking for in regards to the web server box as well as the MySQL server box?

Great questions. I'd love
Great questions. I'd love to know what people suggest. Subscribing to the topic...
Memory
My own experience has been that memory is a critical resource for Drupal sites. If you are using Apache and its pre-fork manager, each child process can respond to exactly one request at a time. Each child process can easily consume 15 to 25M of memory, depending on the complexity of the most complex page it has served (httpd processes allocate but do not deallocate memory).
If you have a machine with 1G of RAM, the maximum number of httpd processes would be 1G/25M/process = 40 processes, and that assumes that absolutely nothing else is running. A more reasonable value would be 50% of the available memory given to Apache, so the number of child processes drops to 20.
You can put as many database servers as you like on the back end, but the maximum number of concurrent users on the site just described is 20.
You can reduce the Apache process footprint by careful selection of the modules that you use in Drupal, by restarting processes after a certain number of responses, by shunting requests for static content (images, for example) to a different server, and other techniques.
So, to briefly answer your question, determine how many concurrent users you expect, then calculate the memory requirements for that number of httpd processes. If you decide that you are willing to accept increased response time for individual requests, you can reduce the number of web server processes and let the requests queue up. The general practice in multi-tiered designs such as a Drupal site is to throttle requests as close to the user's browser as you can to avoid bottlenecks in your system (i.e. each stage in the design should accept more connections than the previous stage).
Perry Donham
www.kidpub.com
Tux for static content
Another good technique is combining Tux for serving static content and apache/lighttpd for dynamic.