MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Jocelyn Fournier Date:August 14 2002 8:05pm
Subject:Re: Persisten Connections
View as plain text  
My own server handle more than 200 queries per second (up to 800 queries per
second), and I use pconnect with a wait_timeout of 20 s only.
With a low wait_timeout number and a high number of queries per second I
think I have both the advantages of connect and pconnect (not too many IDLE
threads, but no overhead due to opening / closing the db).
----- Original Message -----
From: "StreetWarz & SpeedWarz" <webmaster@stripped>
To: "Thomas Seifert" <ts77@stripped>
Cc: <mysql@stripped>
Sent: Wednesday, August 14, 2002 9:48 PM
Subject: Re: Persisten Connections


> I am wondering if this will help me any, I currently serve 800K+ pageviews
> all requesting mysql connections. 120 Queries Per Second. I'm wondering if
> persistant connection will help me, and how I could go about it, if there
is
> 40 different pages all using the same db/tables. I'm kinda new to mysql
and
> cant get a faster machine and almost maxed out here.. looking to increase
> productivity. Any ideas ?
>
> ----- Original Message -----
> From: "Thomas Seifert" <ts77@stripped>
> To: "Tod Harter" <tharter@stripped>
> Cc: <mysql@stripped>
> Sent: Wednesday, August 14, 2002 12:19 PM
> Subject: Re: Persisten Connections
>
>
> > And I disagree with this view.
> >
> > If you've got a server with 512 MB RAM and running the webserver and the
> > db-server on the same machine, 100 idling mysql-processes are a HUGE
> overhead.
> > At most if not every http-request requires a mysql-connection.
> >
> > I did many benchmarks and I got a huge decrease of the server-load as I
> disallowed
> > persistent connections through the php.ini.
> >
> > I am serving around 180K pageviews/day with this config and on the
> described server.
> >
> > AFAIK it is MUCH more than 100K per mysql-process and a large process
> table is also
> > of no gain.
> >
> > I may have to agree to your view but only if you have different servers
> for webserver
> > and database, but I never tested such a config.
> >
> >
> > Thomas
> >
> >
> >
> > On Wed, 14 Aug 2002 11:14:33 -0400 Tod Harter
> <tharter@stripped> wrote:
> >
> > > On Wednesday 14 August 2002 09:54 am, Thomas Seifert wrote:
> > >
> > > I disagree entirely....
> > >
> > > Persistent connections have little or nothing to do with increasing
> load!
> > >
> > > Given that you mention you are using PHP I'll assume you have mod_php
> running
> > > in Apache. Each Apache child process in this configuration will
maintain
> ONE
> > > open database handle, so 100k pageviews per day I would expect you
might
> max
> > > at like 30k in one hour, or around 10/second, so you might top out at
> roughly
> > > 100 Apache child processes at any one time, thus 100 database
> connections.
> > >
> > > Each DB connection is not a huge overhead, but creating and destroying
> 10
> > > database handles PER SECOND is a large overhead!!! Remember, every
time
> mysql
> > > creates a connection it has to do internal queries on the grant
tables.
> I
> > > don't know exactly what the overhead of that is going to be, but
> ANYTHING
> > > that creates 10 queries per second is putting some strain on your
> database
> > > server!
> > >
> > > One of the main goals of using Apache modules for scripting was to
allow
> > > persistent database connections. There is really NO reason to give up
> that
> > > advantage. Remember, MySQL is multi-threaded, with one thread per
> connection,
> > > so the resources for a database connection are on the order of under
> 100k of
> > > memory per connection.
> > >
> > > > it will reduce the load for sure!
> > > > MySQL is very fast in opening and closing connections at least if
the
> > > > database-server and webserver are on the same machine.
> > > > I don't know how it will perform on different machines.
> > > >
> > > >
> > > > Thomas
> > > >
> > > > On Wed, 14 Aug 2002 14:40:31 +0100
> > > >
> > > > "John Wards" <j.wards@stripped> wrote:
> > > > > I am running a website which generates around 100,000 pageviews
> a
> day and
> > > > > I am wondering if I stop using persistent conections to the
> MySQL
> > > > > database and use
> > > > > normal open and close conections this would reduce the load onto
my
> > > > > server?
> > > > >
> > > > > Most conections are either made through my "main" file or the
phorum
> > > > > message board system.
> > > > >
> > > > > Thanks in advance
> > > > > John Wards
> > > >
> > >
> ---------------------------------------------------------------------
> > > > Before posting, please check:
> > > >    http://www.mysql.com/manual.php   (the manual)
> > > >    http://lists.mysql.com/           (the list archive)
> > > >
> > > > To request this thread, e-mail
> <mysql-thread117070@stripped>
> > > > To unsubscribe, e-mail
> > > > <mysql-unsubscribe-tharter=aptusventures.com@stripped>
Trouble
> > > > unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> > >
> >
> > ---------------------------------------------------------------------
> > Before posting, please check:
> >    http://www.mysql.com/manual.php   (the manual)
> >    http://lists.mysql.com/           (the list archive)
> >
> > To request this thread, e-mail <mysql-thread117107@stripped>
> > To unsubscribe, e-mail
> <mysql-unsubscribe-webmaster=zone-killer.com@stripped>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> >
> >
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <mysql-thread117111@stripped>
> To unsubscribe, e-mail
<mysql-unsubscribe-joc=presence-pc.com@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
>
>

Thread
Persisten ConnectionsJohn Wards14 Aug
  • Re: Persisten ConnectionsThomas Seifert14 Aug
    • Re: Persisten ConnectionsTod Harter14 Aug
  • Re: Persisten ConnectionsJocelyn Fournier14 Aug
  • Re: Persisten Connectionspeter.brawley14 Aug
  • Re: Persisten ConnectionsJocelyn Fournier14 Aug
  • Re: Persisten ConnectionsStreetWarz & SpeedWarz14 Aug
  • Re: Persisten ConnectionsJocelyn Fournier15 Aug
  • Re: Persisten ConnectionsGelu Gogancea15 Aug
  • Re: Persisten Connectionsmos16 Aug
  • Re: Persisten Connectionsmos17 Aug
Re: Persisten ConnectionsPaul DuBois14 Aug
Re: Persisten ConnectionsThomas Seifert14 Aug
RE: Persisten ConnectionsSteve Orr16 Aug
RE: Persisten ConnectionsSteve Orr16 Aug