Re: [PHP] Speed of MySQL connections - Socket vs. Non-Socket
Hi Alexander, @ 6:55:58 PM on 4/16/2001, Alexander Skwar wrote: ... > In a mysql_connect() it is possible to specify a path to the socket > which should be used for communicating with MySQL. Yes, it's in the documentation. int mysql_connect ([string hostname [:port] [:/path/to/socket] [, string username [, string password]]]) http://www.php.net/manual/en/function.mysql-connect.php > Now, when I connect thru a socket, is the datatransfer between PHP > and MySQL faster than when I connect via a (loop-)network? I would > assume so, because with a socket, there's not the network layer in > the way which has to be taken care of. > Is this correct? No earthly idea. -Brian -- PGP is spoken here: 0xE4D0C7C8 Please, DO NOT carbon copy me on list replies. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Speed of MySQL connections - Socket vs. Non-Socket
So sprach Brian Clark am Mon, Apr 16, 2001 at 07:17:43PM -0400: > > In a mysql_connect() it is possible to specify a path to the socket > > which should be used for communicating with MySQL. > > Yes, it's in the documentation. Please read again what I wrote Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 1 hour 21 minutes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Speed of MySQL connections - Socket vs. Non-Socket
Hi Alexander, @ 7:29:45 PM on 4/16/2001, Alexander Skwar wrote: ... > Please read again what I wrote OK. > In a mysql_connect() it is possible to specify a path to the socket > which should be used for communicating with MySQL. Yes. [string hostname [:port] [:/path/to/socket] > Now, when I connect thru a socket, is the datatransfer between PHP > and MySQL faster than when I connect via a (loop-)network? No idea. -Brian -- PGP is spoken here: 0xE4D0C7C8 Please, DO NOT carbon copy me on list replies. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Speed of MySQL connections - Socket vs. Non-Socket
On Tue, Apr 17, 2001 at 01:29:45AM +0200, Alexander Skwar wrote: > So sprach Brian Clark am Mon, Apr 16, 2001 at 07:17:43PM -0400: > > > In a mysql_connect() it is possible to specify a path to the socket > > > which should be used for communicating with MySQL. > > > > Yes, it's in the documentation. > > Please read again what I wrote I haven't to read the manual again. This is very well documented in the manual. If I remember correctly, I have put this lines into the PHP manual. -Egon -- LinuxTag, Stuttgart, Germany: July 5-8 2001: http://www.linuxtag.de/ All known books about PHP and related books: http://php.net/books.php Concert Band of the University of Hohenheim: http://www.concert-band.de/ First and second bestselling book in German: http://www.php-buch.de/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Speed of MySQL connections - Socket vs. Non-Socket
> > Please read again what I wrote > > OK. > > > In a mysql_connect() it is possible to specify a path to the socket > > which should be used for communicating with MySQL. > > Yes. [string hostname [:port] [:/path/to/socket] It's not a question. It is a statement prefecaing the real question, which was is connecting directly to a socket faster. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Speed of MySQL connections - Socket vs. Non-Socket
Hi Joe, @ 8:04:08 PM on 4/16/2001, Joe Sheble (Wizaerd) wrote: ... >> > In a mysql_connect() it is possible to specify a path to the socket ^^ >> > which should be used for communicating with MySQL. >> >> Yes. [string hostname [:port] [:/path/to/socket] > It's not a question. It is a statement prefecaing the real question, > which was is connecting directly to a socket faster. Ahhh, yes, I see that was stupid. Sorry, Alexander. :) I guess it's time to go back into hibernation. -Brian -- PGP is spoken here: 0xE4D0C7C8 Please, DO NOT carbon copy me on list replies. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Speed of MySQL connections - Socket vs. Non-Socket
So sprach [EMAIL PROTECTED] am Tue, Apr 17, 2001 at 01:55:01AM +0200: > I haven't to read the manual again. This is very well documented in the > manual. If I remember correctly, I have put this lines into the PHP > manual. Pardon me, but where is it very well documented what I asked about? Certainly not in the manual I always use: http://php.net/manual/en/function.mysql-connect.php Just to clarify: I did not ask if it is possible to do so. I've read this myself in the very good manual and would certainly not ask such a question here. But maybe I'm wrong: Where is the answer to my question "well documented"? Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 1 hour 55 minutes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Speed of MySQL connections - Socket vs. Non-Socket
So sprach Brian Clark am Mon, Apr 16, 2001 at 07:37:54PM -0400: > > In a mysql_connect() it is possible to specify a path to the socket > > which should be used for communicating with MySQL. > > Yes. [string hostname [:port] [:/path/to/socket] And again: There's no question in the sentence above, is there? If I had questions about this, I'd have said something like: | In a mysql_connect(), is it possible to specify a path to the socket | which should be used for communicating with MySQL? > > Now, when I connect thru a socket, is the datatransfer between PHP > > and MySQL faster than when I connect via a (loop-)network? > > No idea. Yes, I got that :)) Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 1 hour 59 minutes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Speed of MySQL connections - Socket vs. Non-Socket
So sprach Brian Clark am Mon, Apr 16, 2001 at 08:01:04PM -0400: > Ahhh, yes, I see that was stupid. Sorry, Alexander. :) Ah, thanks Joe for clearing up this confusion :)) Now that this is sorted out: What might be the best way to do some benchmarking wrt. this? (Links are fine) Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 2 hours 1 minute -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Speed of MySQL connections - Socket vs. Non-Socket
On Tuesday 17 April 2001 02:10, you wrote: > So sprach Brian Clark am Mon, Apr 16, 2001 at 08:01:04PM -0400: > > Ahhh, yes, I see that was stupid. Sorry, Alexander. :) > > Ah, thanks Joe for clearing up this confusion :)) > > Now that this is sorted out: What might be the best way to do some > benchmarking wrt. this? (Links are fine) run "ab" (comes with apache) on two scripts, one using method A repeatedly, the other using method B repeatedly -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) "Never doubt that a small group of thoughtful, committed people can change the world... Indeed, it's the only thing that ever has." - Margaret Mead -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Speed of MySQL connections - Socket vs. Non-Socket
On 16-Apr-01 Alexander Skwar wrote: > Hello! > > In a mysql_connect() it is possible to specify a path to the socket which > should be used for communicating with MySQL. > > Now, when I connect thru a socket, is the datatransfer between PHP and MySQL > faster than when I connect via a (loop-)network? I would assume so, because > with a socket, there's not the network layer in the way which has to be > taken care of. > > Is this correct? > Yes, from my memory of the mysql list; AF_INET is 7% slower then AF_UNIX in data thru-put. Plus you have to add in the connection build & tear-down time. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Speed of MySQL connections - Socket vs. Non-Socket
So sprach Don Read am Tue, Apr 17, 2001 at 02:14:41PM -0500: > Yes, from my memory of the mysql list; AF_INET is 7% slower then AF_UNIX in > data thru-put. Plus you have to add in the connection build & tear-down time. That's exactly what I'd expect. Hmm, so I take it, I should also ask on the MySQL list? And, do you have any suggestions about how to benchmark this? Thanks a lot, Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 22 hours 21 minutes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Speed of MySQL connections - Socket vs. Non-Socket
So sprach Christian Reiniger am Tue, Apr 17, 2001 at 02:01:48PM +0200: > run "ab" (comes with apache) on two scripts, one using method A > repeatedly, the other using method B repeatedly Thanks, will do. Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 23 hours 6 minutes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Speed of MySQL connections - Socket vs. Non-Socket
So sprach Don Read am Tue, Apr 17, 2001 at 05:13:14PM -0500: > define('DBHOST', 'localhost'); > // define('DBHOST', 'myhost.domain.com'); > > define('QRY', 'select * from foo'); > > $db=mysql_connect(DBHOST, DBUSER, DBPASS); > if ( $db ) > testquery(QRY); > > > ?> > > set the define(s) to something sensible for your setup. > > 'myhost.domain.com' would be your network hostname for the box, either in > /etc/hosts or from your DNS server. > > test the numbers using the 'localhost' (the AF_UNIX socket). > comment/uncoment the 'myhost' line & re-test (AF_INET connect). the first define, defines a connect using a AF_UNIX socket? Are you sure? According to the manual, I'd have thought, that I'd need to do: define('DBHOST', 'localhost:/tmp/mysql.sock' ); Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 1 day 0 hours 33 minutes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Speed of MySQL connections - Socket vs. Non-Socket
So sprach Don Read am Tue, Apr 17, 2001 at 06:06:53PM -0500: > I have with 3.0.18 installed (to match customers), 'localhost' will use the > /tmp/mysql.sock. This may have changed under 4.x. Oh, yes, you are right! Thanks a lot - would have thought that I'd need to say 'localhost:/tmp/mysql.sock', but, guess I'm wrong :) Thanks, Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 1 day 1 hour 25 minutes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]