Am 29.03.2012 19:20, schrieb Rick James: > I'll disagree with your disagreement. > > Many web servers maintain persistent connections.
this is a stupid idea for most workloads i thought we are speaking about useful configured servers persistent connections will not work on machines with many websites / db-users, you describe the result of using them - they are only useful on dedicated servers with only one db-user > This leads to eventually exceeding max_connections, even if > connections are rare. Once he hits 41, he will be issuing 404s, or other bad > stuff. that is why you have to find out a typical workload my software is using a self written db-abstraction which will try again if connect fails up to 10 times this does usually not happen often > Also, having 1000 http threads hanging around is a waste when you rarely have > 10 active at once. Or do your > threads somehow take a long time without taking much in resources (CPU, I/O, > MySQL, etc)? If each of 1000 threads > took only 1% of the CPU, the CPU would be overloaded, even on an 8-core box. what exactly did you not understadn in my last paragraph? >> however - 1000 is much too high if we are speak >> about a preforked server on most hardware - keep >> in mind that a worker process with mod_php consumes >> some MB of memory in a typical environment with enough memory even this would be possible i had a prjoect last year with 400 active httpd-workers on a high dynamic webpage on a virtaul machine while the host serves 10 other different guests with a mixed workload of some webservers with > 500 domains, mail, spamfirewall and vpn-gateway and the host did never get higher than 70% CPU ok, all the 500 domains are using a highly optimized CMS which was inhouse developed and is maintained and optimized since 10 years, but you see the workload is possible without problems > On 3/27/12 10:38 PM, Reindl Harald wrote: >> >> Am 27.03.2012 23:24, schrieb Rick James: >>> MaxClients 1000 >>> could overwhelm max_connections = 41 . Strongly recommend you decrease >>> MaxClients to less than max_connections >>> (not the other way around). >> totally wrong! >> >> not every http-connection implies a myql-connection >> a website typically contains a lot of static files >> like images, javascripts, stylesheets and you bring >> down your httpd if MaxClients is set too low and >> you are unable to serve waiting clients >> >> additionally if KeepAlive is used there are open >> httpd-connections with NO db-connection after >> serving a dynamic page using one out of MaxClients >> for a timewindow based on KeepAliveTimeout >> >> MaxClients on httpd should never be lower than "max_connections" >> "max_connections" is primary a question of RAM and typical load >> >> mysqltuner.pl: >> [--] Total buffers: 2.4G global + 3.2M per thread (200 max threads) >> [OK] Maximum possible memory usage: 3.0G (37% of installed RAM) >> _____________________ >> >> however - 1000 is much too high if we are speak >> about a preforked server on most hardware - keep >> in mind that a worker process with mod_php consumes >> some MB of memory in a typical environment >> >> but this is all not mysql related >> > -- Mit besten Grüßen, Reindl Harald the lounge interactive design GmbH A-1060 Vienna, Hofmühlgasse 17 CTO / software-development / cms-solutions p: +43 (1) 595 3999 33, m: +43 (676) 40 221 40 icq: 154546673, http://www.thelounge.net/ http://www.thelounge.net/signature.asc.what.htm
signature.asc
Description: OpenPGP digital signature