List:Internals« Previous MessageNext Message »
From:Mark Callaghan Date:April 2 2007 2:13am
Subject:Re: mysqlclient performance with syscalls
View as plain text  
Which version of the libraries do you use (4.0, 4.1, 5.0)?
This has been fixed in recent versions of 5.0, and applications that fetch a
lot rows spend much less time in MySQL code.

On 4/1/07, Joseph Benden <joe@stripped> wrote:
>
> Hello,
>
> I cannot find anyone mentioning this elsewhere on the web or this list
> so I was wondering...
>
> I'm trying to squeeze all the performance possible from every piece of
> my Solaris systems.  The last piece that is bugging me is the high
> number of system calls experienced on the machines.  In analyzing the
> web server, I found the problem was the read() system call.  Next, I
> wanted to know what sizes were being read and where from.  It turns out
> the read()s are from the mysqlclient library and are 4 byte reads.
>
>            value  ------------- Distribution ------------- count
>                0 |                                         0
>                1 |@@@@@                                    3447
>                2 |@                                        616
>                4 |@@@@@@@@@@@@@@@@@@@                      12531
>                8 |@                                        626
>               16 |@@@@@@@@                                 4966
>               32 |@@                                       1158
>               64 |                                         153
>              128 |                                         29
>              256 |                                         15
>              512 |                                         5
>             1024 |                                         17
>             2048 |                                         0
>             4096 |                                         0
>             8192 |@@@@                                     2667
>            16384 |                                         0
>
>
> Upon further research with dtrace, I've found these read()s to
> correspond with the MySQL protocol packet header being read().
>
> I was wondering why a buffered approach wasn't taken.  ie: A general
> buffered read() of everything possible from the wire and the protocol
> code asking for the number of bytes from that buffered area. I feel that
> in doing this many system calls could be reduced, which would increase
> the speed of using the library.
>
> Comments, suggestions, ideas?  Thanks,
> -Joseph Benden
> Thralling Penguin LLC
>
>
> --
> MySQL Internals Mailing List
> For list archives: http://lists.mysql.com/internals
> To unsubscribe:
> http://lists.mysql.com/internals?unsub=1
>
>


-- 
Mark Callaghan
mcallaghan@stripped

Thread
mysqlclient performance with syscallsJoseph Benden1 Apr
  • Re: mysqlclient performance with syscallsMark Callaghan2 Apr
  • Re: mysqlclient performance with syscallsChad MILLER2 Apr