woodchuck
06-11-2009, 11:38 AM
Hi,
I just moved my site to a virtual private server from a shared environment, so its my first time having this much control. Just what I needed...more responsibility. :eek::confused::D
The VPS has 2.0 GB of memory usage available and I seem to be averaging 225 MB during off hours and just over 300 MB during peak hours during the week. Weekends are busier but I only got this on Monday so that remains an unknown.
While looking in the apache log I seen this yesterday [Wed Jun 10 15:39:37 2009] [error] server reached MaxClients setting, consider raising the MaxClients setting which was preceded in the previous 30 secs of +20 entires of what looks like warnings and errors. As well, before and after that block of data there are 20 or so "Invalid query name 1".
A short conversation with the Tier II tech who moved my site for me he said As far as the MaxClients error, that's an indication of a high level of traffic on the server, causing Apache2 to error out. This can be increased inside of the file '/etc/apache2/apache2.conf'. Do some research on what 'maxclients' means, and increase in small increments, as opening up too many clients can overload the server as a whole, and cause Apache2 to lag, among other anomalies. I looked up in the apache.conf file and see MaxClients = 30 but there are two listed, one under 'prefork MPM' and the other under 'worker MPM'.
I found http://httpd.apache.org/docs/2.0/mod/worker.html and http://httpd.apache.org/docs/2.0/mod/prefork.html and they both seem to do similar functions except one seems do more. I got this from Apache
http://httpd.apache.org/docs/2.0/misc/perf-tuning.html
* The worker MPM uses multiple child processes with many threads each. Each thread handles one connection at a time. Worker generally is a good choice for high-traffic servers because it has a smaller memory footprint than the prefork MPM.
* The prefork MPM uses multiple child processes with one thread each. Each process handles one connection at a time. On many systems, prefork is comparable in speed to worker, but it uses more memory. Prefork's threadless design has advantages over worker in some situations: it can be used with non-thread-safe third-party modules, and it is easier to debug on platforms with poor thread debugging support.
Does it matter which I increase? Or should only one be showing up on the apache.conf file?
As far as I can understand, to determine a proper value for MaxClients, I would have to determine how much memory is consumed by each process and divide that into the total memory available. While also keeping in mind that if Apache and MySQL are running in the same environment, then a chunk of memory should me allocated to MySQL. I've read that half the onboard memory should be set aside for MySQL. The unknown value is how much memory is used by each process. I have no idea what that would be. Would there be something to look at on the server that could determine that?
Any help would be appreciated. Try to keep your explainations in layman's terms if you could. :o Thanks in advance.
I just moved my site to a virtual private server from a shared environment, so its my first time having this much control. Just what I needed...more responsibility. :eek::confused::D
The VPS has 2.0 GB of memory usage available and I seem to be averaging 225 MB during off hours and just over 300 MB during peak hours during the week. Weekends are busier but I only got this on Monday so that remains an unknown.
While looking in the apache log I seen this yesterday [Wed Jun 10 15:39:37 2009] [error] server reached MaxClients setting, consider raising the MaxClients setting which was preceded in the previous 30 secs of +20 entires of what looks like warnings and errors. As well, before and after that block of data there are 20 or so "Invalid query name 1".
A short conversation with the Tier II tech who moved my site for me he said As far as the MaxClients error, that's an indication of a high level of traffic on the server, causing Apache2 to error out. This can be increased inside of the file '/etc/apache2/apache2.conf'. Do some research on what 'maxclients' means, and increase in small increments, as opening up too many clients can overload the server as a whole, and cause Apache2 to lag, among other anomalies. I looked up in the apache.conf file and see MaxClients = 30 but there are two listed, one under 'prefork MPM' and the other under 'worker MPM'.
I found http://httpd.apache.org/docs/2.0/mod/worker.html and http://httpd.apache.org/docs/2.0/mod/prefork.html and they both seem to do similar functions except one seems do more. I got this from Apache
http://httpd.apache.org/docs/2.0/misc/perf-tuning.html
* The worker MPM uses multiple child processes with many threads each. Each thread handles one connection at a time. Worker generally is a good choice for high-traffic servers because it has a smaller memory footprint than the prefork MPM.
* The prefork MPM uses multiple child processes with one thread each. Each process handles one connection at a time. On many systems, prefork is comparable in speed to worker, but it uses more memory. Prefork's threadless design has advantages over worker in some situations: it can be used with non-thread-safe third-party modules, and it is easier to debug on platforms with poor thread debugging support.
Does it matter which I increase? Or should only one be showing up on the apache.conf file?
As far as I can understand, to determine a proper value for MaxClients, I would have to determine how much memory is consumed by each process and divide that into the total memory available. While also keeping in mind that if Apache and MySQL are running in the same environment, then a chunk of memory should me allocated to MySQL. I've read that half the onboard memory should be set aside for MySQL. The unknown value is how much memory is used by each process. I have no idea what that would be. Would there be something to look at on the server that could determine that?
Any help would be appreciated. Try to keep your explainations in layman's terms if you could. :o Thanks in advance.