Question by rototo: Apache configuration?
Hello
I’d like to configure apache for 1024 simultaneous connections or more.
How do I do that ?
Also, what would be the minimal configuration of the server machine to be confortable with that many configuration ?
is apache using more cpu and ram than mysql 5 or is it the opposite ?
we will probably run on a gentoo version.
We will have between 8 gb ram.
apache 2.0
mysql 5.0
php 5
Core2Quad Q6600
4x 2.40 GHz
Architecture64 bits
SATA2 RAID HARD 1
Best answer:
Answer by syshook
The Apache configuration file is called HTTPD.CONF and all the settings are inside that neatly documented.
Apache typically requires 2MB memory per connection, hence 1024 connections would require 2048MB.
Scripts based pages require further memory. For ex: PHP pages can require upto 16MB (limit set in PHP.INI) per connection.
YMMV.
What do you think? Answer below!
Revisions
There are no revisions for this post.
Users who found this page were searching for:
- "memory per connection" tomcat
- "apache struts 2 web application development" epub
- "memory per connection" tomcat
- tomcat memory per connection
What’s the operating system you’re running apache on ? You may need additional tweaking on the OS’s side.
Apache will handle the connections automatically, bear in mind the memory requirements our friend posted on his previous answers.
THe good news is that in almost all SO’s the tweaking will be pretty easey. The bad news is that you won’t be able to run this many connections on certain SO’s …
You’ll need to set the ‘MaxClients’ directive in your Apache config file.
This page tells you more: http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxclients
For your other questions, the answers very much depend on the type of requests you are dealing with. So there’s no one generic definite answer to those, I’m afraid. But you may want to use the ‘ab’ (Apache Benchmarker) script (located in the ‘bin/’ directory under your Apache source directory) to test how well your server work under different circumstances.