List:General Discussion« Previous MessageNext Message »
From:spameden Date:April 2 2013 10:01pm
Subject:Re: How to change max simultaneous connection parameter in mysql.
View as plain text  
2013/4/3 Rick James <rjames@stripped>

> SELECT is not performed in the same thread as nginx; it is performed in
> another process, or even (in big web setups) in a different host.
>  Therefore, nginx would be in some form of "wait" state, thereby not really
> using the CPU.
>

ofc select is not performed in nginx thread, nginx acts as a proxying
server and just passes the request to the backend

it's entirely depends on your backend how fast it's gonna process certain
SELECT and ofc depends on what kind of database you've got

if backend takes too long to respond nginx just shows 502 error with
timeout from backend (by default: 30s).

good practice is to have multiple backends behind load balancer, so under
huge load no single request would be lost.


>
> > -----Original Message-----
> > From: Reindl Harald [mailto:h.reindl@stripped]
> > Sent: Tuesday, April 02, 2013 2:00 PM
> > To: mysql@stripped
> > Subject: Re: How to change max simultaneous connection parameter in
> > mysql.
> >
> >
> >
> > Am 02.04.2013 22:56, schrieb Rick James:
> > > I hear that nginx is very fast for a certain class of web serving.
> >
> > yes
> >
> > > But what happens if a web page needs to do a SELECT?
> >
> > what should happen?
> >
> > > Is nginx single-threaded, thereby sitting "idle" waiting for the
> > SELECT?
>

nginx is multi threaded and it supports SMP architecture, there is main
process which controls everything and nginx configuration can be reloaded
with zero downtime.

I saw multiple test where under load (simple DDoS simulation attack like
there where 40k bots hitting the site at once) nginx+php5-fpm dropped much
less requests than apache2 + mod_php.

apache2 is so bad at eating memory and system resources.


> >
> > why should it do that?
> >
> > > And, should you run 8 nginx web servers on an 8-core box?
>

no, you just tune

worker_processes 8;

>
> > why should you do that?
> >
> > http://en.wikipedia.org/wiki/Nginx
> > nginx uses an asynchronous event-driven approach to handling requests
> >
> > >> -----Original Message-----
> > >> From: spameden [mailto:spameden@stripped]
> > >> Sent: Tuesday, April 02, 2013 7:10 AM
> > >> To: Reindl Harald
> > >> Cc: mysql@stripped
> > >> Subject: Re: How to change max simultaneous connection parameter in
> > >> mysql.
> > >>
> > >> 2013/3/24 Reindl Harald <h.reindl@stripped>
> > >>
> > >>>
> > >>>
> > >>> Am 24.03.2013 05:20, schrieb spameden:
> > >>>> 2013/3/19 Rick James <rjames@stripped>:
> > >>>>>> you never have hosted a large site
> > >>>>> Check my email address before saying that.
> > >>>>
> > >>>> :D
> > >>>
> > >>> as said, big company does not have only geniusses
> > >>>
> > >>
> > >> I do not judge only on 1 parameter, Rick has been constantly helping
> > >> here and I'm pretty sure he has more knowledge on MySQL than you.
> > >>
> > >>
> > >>>
> > >>>>> 20 may be low, but 100 is rather high.
> > >>>> Never use apache2 it has so many problems under load..
> > >>>
> > >>> if you are too supid to configure it yes
> > >>>
> > >>
> > >> Ever heard about Slow HTTP DoS attack?
> > >>
> > >>
> > >>>
> > >>>> The best combo is php5-fpm+nginx.
> > >>>> Handles loads of users at once if well tuned
> > >>>
> > >>> Apache 2.4 handles the load of 600 parallel executed php-scripts
> > >>> from our own CMS-system
> > >>>
> > >>
> > >> Nginx serves static content way better than apache2 (did few
> > >> benchmarks already).
> > >>
> > >> nginx+php5-fpm handles better load than apache2-prefork+mod_php
> > >>
> > >> you can google benchmarks if you dont trust me
> > >>
> > >> also nginx eats much less memory than apache2
> > >>
> > >> php5-fpm can be tuned as well to suit your needs if you have lots of
> > >> dynamic content
> > >>
> > >>
> > >>> maybe you guys should learn what a opcode-cache is and how to
> > >>> compile and optimize software (binaries and config)
> > >>>
> > >>> o'rly?
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql
>
>

Thread
How to change max simultaneous connection parameter in mysql.Kevin Peterson16 Mar
  • Re: How to change max simultaneous connection parameter in mysql.Reindl Harald16 Mar
  • Re: How to change max simultaneous connection parameter in mysql.Manuel Arostegui16 Mar
    • Re: How to change max simultaneous connection parameter in mysql.Igor Shevtsov16 Mar
      • RE: How to change max simultaneous connection parameter in mysql.Rick James18 Mar
        • Re: How to change max simultaneous connection parameter in mysql.Reindl Harald18 Mar
          • RE: How to change max simultaneous connection parameter in mysql.Rick James18 Mar
            • Re: How to change max simultaneous connection parameter in mysql.Reindl Harald18 Mar
              • Re: How to change max simultaneous connection parameter in mysql.Noel Butler18 Mar
              • RE: How to change max simultaneous connection parameter in mysql.Rick James19 Mar
                • Re: How to change max simultaneous connection parameter in mysql.Reindl Harald19 Mar
                • Re: How to change max simultaneous connection parameter in mysql.spameden24 Mar
                  • Re: How to change max simultaneous connection parameter in mysql.Reindl Harald24 Mar
                    • Re: How to change max simultaneous connection parameter in mysql.Manuel Arostegui24 Mar
                    • Re: How to change max simultaneous connection parameter in mysql.spameden2 Apr
                      • Re: How to change max simultaneous connection parameter in mysql.Reindl Harald2 Apr
                        • RE: How to change max simultaneous connection parameter in mysql.Rick James2 Apr
                          • Re: How to change max simultaneous connection parameter in mysql.Reindl Harald2 Apr
                      • RE: How to change max simultaneous connection parameter in mysql.Rick James2 Apr
                        • Re: How to change max simultaneous connection parameter in mysql.Reindl Harald2 Apr
                          • RE: How to change max simultaneous connection parameter in mysql.Rick James2 Apr
                            • Re: How to change max simultaneous connection parameter in mysql.Reindl Harald2 Apr
                            • Re: How to change max simultaneous connection parameter in mysql.spameden2 Apr