List:General Discussion« Previous MessageNext Message »
From:Jeremy Zawodny Date:January 23 2002 1:04am
Subject:Re: Bytes sent vs. Bandwidth used
View as plain text  
On Tue, Jan 22, 2002 at 07:21:36PM -0500, James Riordon wrote:
> On Tuesday, January 22, 2002, at 01:48 PM, Dan Nelson wrote:
> 
> > In the last episode (Jan 22), James Riordon said:
> >> At 22:35 -0800 01/21/2002, I whispered:
> >>> On Mon, Jan 21, 2002 at 11:02:47PM -0500, James Riordon wrote:
> >>>>
> >>>> I have our new client up and running and have come upon another
> >>>> question. When I get extended-status I get the following:
> >>>>
> >>>> | Bytes_received           | 53553199  |
> >>>> | Bytes_sent               | 664736462 |
> >>>
> >>> Is Apache/PHP on the same server as MySQL?
> >>
> >> Yes. We have Apache, PHP and MySQL all running on the same server.
> >> Our actual throughput yesterday actually turned out to be closer to
> >> 350MB but the MySQL extended-status Bytes_Sent showed around 700MB by
> >> the end of the day.
> >
> > Do you connect via unix domain sockets (i.e. 'localhost'), or TCP
> > sockets?  Unix sockets will not be counted in any TCP traffic stats.
> 
> All of our connections are through localhost. So what I get from
> this is that all internal traffic on the localhost will not get
> counted, but the final results that are sent through PHP and TCP
> sockets will get counted.

Exactly.  The MySQL <--> PHP traffic never hits a physical network
interface, so there's nothing to count, really.

> If this difference between unix domain sockets is huge compared to
> TCP sockets, would that mean that the database queries are
> inefficient?

There's a good chance you're doing a lot of "SELECT * FROM foo" and
only using a few of the columns which come back.

Have a look thru this and see if it offers any help:

  http://www.linux-mag.com/2001-06/mysql_01.html

Good Luck,

Jeremy
-- 
Jeremy D. Zawodny, <jzawodn@stripped>
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936

MySQL 3.23.41-max: up 20 days, processed 457,350,077 queries (263/sec. avg)
Thread
Bytes sent vs. Bandwidth usedJames Riordon22 Jan
  • Re: Bytes sent vs. Bandwidth usedJeremy Zawodny22 Jan
    • Re: Bytes sent vs. Bandwidth usedJames Riordon22 Jan
      • Re: Bytes sent vs. Bandwidth usedDan Nelson22 Jan
        • Re: Bytes sent vs. Bandwidth usedJames Riordon23 Jan
          • Re: Bytes sent vs. Bandwidth usedJeremy Zawodny23 Jan
            • Re: Bytes sent vs. Bandwidth usedJames Riordon23 Jan