Home |  MySQL Buzz |  FAQ |  Feeds |  Submit your blog feed |  Feedback |  Archive |  Aggregate feed RSS 2.0 English Deutsch Español Français Italiano 日本語 Русский Português 中文
Previous 30 Newer Entries Showing entries 31 to 60 of 60

Displaying posts with tag: dtrace (reset)

Paper: Optimizing MySQL Database Application Performance with DTrace
Employee +0 Vote Up -0Vote Down

Just came across this paperOptimizing MySQL Database Application Performance with Solaris Dynamic Tracing

Looks useful.

Paper: Optimizing MySQL Database Application Performance with DTrace
Employee +0 Vote Up -0Vote Down

Just came across this paperOptimizing MySQL Database Application Performance with Solaris Dynamic Tracing

Looks useful.

MySQL University: Using DTrace with MySQL
Employee +0 Vote Up -0Vote Down

This Thursday (February 12th, 14:00 UTC), MC Brown will give a MySQL University session on Using DTrace with MySQL. MC has been involved not just with documenting DTrace but also with DTrace development; see his recent blog post for details.

For MySQL University sessions, point your browser to this page. You need a browser with a working Flash plugin. You may register for a Dimdim account, but you don't have to. (Dimdim is the conferencing system we're using for MySQL


  [Read more...]
LOSUG Presentation Slides Now Available
+0 Vote Up -0Vote Down

My presentation at LOSUG on tuesday went down like a house on fire - I think it would be safe to say that the phrase for the evening was ‘It’s a cache!’.

For that to make sense, you need to look at the slides, which are now available here.

Attendance was great, but it seems the last minute change of day meant that some people missed the session. We had 151 people register, and about 80 turned up on the night.

LOSUG January: MySQL/DTrace and Memcached
+0 Vote Up -0Vote Down

Next Tuesday (27th Jan), I’ll be speaking at the London OpenSolaris User Group again. For those that follow the LOSUG meetings, we normally the third thursday of the month, but due to the overwhelming popularity of the event this month (more 100 registrations so far) we have had to push the event back to the last Tuesday of the month.

This month, I’ll be talking about the DTrace probes that we have added into MySQL and demonstrating their use and functionality. Along the way I’ll also cover some of the internals of MySQL and how it works (and how they relate to the DTrace probes we’ve added), how to use the probes to analyze and diagnose your queries, and how I’ve already used the DTrace probes to

  [Read more...]
MySQL University: Using DTrace with MySQL
Employee +0 Vote Up -0Vote Down

This Thursday (December 18th), Martin "MC" Brown will talk about using DTrace with MySQL. MC is the Solaris (and, naturally, DTrace and ZFS) expert on the Sun Database Group documentation team. He's helped the openSolaris team port MySQL to openSolaris.

Note that we'll be using a new session address / Dimdim URL:

http://webmeeting.dimdim.com/portal/JoinForm.action?confKey=mysqluniversity

You can bookmark this address, since it will remain valid for all future MySQL University sessions. Remember, though, that the meeting room will


  [Read more...]
The Query Analyzer — a potential Killer App?
Employee +0 Vote Up -0Vote Down

There have been plenty of blog entries and writings about the MySQL Query Analyzer, for what I think are good reasons. Labeling it a potential Killer App, causing many MySQL users to become paying Sun customers, may be a daring thing. However, the Query Analyzer might very well have what it takes. The key benefit of it is that it identifies the source of performance bottlenecks. In that sense, one could perhaps instead call it a

  [Read more...]
MySQL Query Analyzer vs. Percona’s Patches
Employee +0 Vote Up -0Vote Down

So it’s been a while since I’ve hit my blog, but I feel compelled to respond to Baron’s post, and many of the other (perhaps short sighted) criticisms out there against this new functionality that we’ve been working on for so long.

Everybody seems to be saying that this functionality should be implemented in the server, or that the better way to do this is to use these patches which add functionality to the logging that MySQL already provides. Well guess what people - what does that give you, other than some more details on you queries?

More I/O.

What’s bad on a database server?

More I/O.

Query Analyzer, whilst it does currently use a proxy to collect the statistics, doesn’t hit your disk at all. Everything is collected

  [Read more...]
DTrace, opensolaris and MySQL Performance
Employee +0 Vote Up -0Vote Down
Currently I'm working hard to find and remove scalability
bottlenecks in the MySQL Server. MySQL was acquired by Sun
10 months ago by now. Many people have in blogs wondered what
the impact has been from this acquisition. My personal
experience is that I now have a chance to work with Sun
experts in DBMS performance. As usual it takes time when
working on new challenges before the flow of inspiration
starts flowing. However I've seen this flow of inspiration
starting to come now, so the fruit of our joint work is
starting to bear fruit. I now have a much better understanding
of MySQL Server performance than I used to have. I know fairly
well where the bottlenecks are and I've started looking
into how they can be resolved.

Another interesting thing with Sun is the innovations they have
done in a number














  [Read more...]
MySQL University: MySQL and OpenSolaris
Employee +0 Vote Up -0Vote Down
Entered 50 minute late (thanks to a wrong timezone calculation) into the MySQL University Session: MySQL and OpenSolaris by Martin MC Brown.


Incase you have missed it altogether, go grab the slides from the Wiki page.

Future and past univesity sessions are listed here at http://forge.mysql.com/wiki/MySQL_University
MySQL University: MySQL and OpenSolaris
Employee +0 Vote Up -0Vote Down
Entered 50 minute late (thanks to a wrong timezone calculation) into the MySQL University Session: MySQL and OpenSolaris by Martin MC Brown.


Incase you have missed it altogether, go grab the slides from the Wiki page.

Future and past univesity sessions are listed here at http://forge.mysql.com/wiki/MySQL_University
More on DTrace ... and MySQL
Employee +0 Vote Up -0Vote Down

Angelo recently showed an easy way to dump SQL queries using DTrace, while reading the articles I felt that some important information is missing: The name of the user executing the query and the selected database. So I sat down a few minutes and tried to collect that data.

For the database name I found a quite simple solution: It is passed as parameter to the check_user() function to MySQL so we can easily add a thread-local variable to keep that name. Simple script for that:

#!/usr/sbin/dtrace -s

#pragma D option quiet

pid$1::*check_user*:entry
{
self->db = arg4 ? copyinstr(arg4) : "(no schema)";
}

pid$1::*dispatch_command*:entry
{
printf("%s: %s\n", self->db,










  [Read more...]
Optimizing the DTrace logger for MySQL queries
Employee +0 Vote Up -0Vote Down
The Data Charmer Giuseppe Maxia did some quick tests on the DTrace script and was wondering if I could optimize it a little.

One issue with the old script is that it prints every SQL statement and this can be pretty expensive. This can be minimized by printing to a file. Here is a script that will do just that. The freopen() is not documented but it opens a file and sends all prints to the file. Giuseppe reports a 30% improvement in logging performance with this improved script.

#!/usr/sbin/dtrace -qws
BEGIN
{
	freopen("/tmp/sqls");
}

pid$1::*dispatch_command*:entry
{
	printf("%d::%s\n",tid,copyinstr(arg2));
}

One more optimization that you can use with DTrace is the use of aggregates. Aggregates provides summary information. So this script will not provide you with the running log but if performance of


  [Read more...]
Why did sun really buy MySQL ?
+0 Vote Up -0Vote Down

To save Solaris from a certain death ?

Reading Planet MySQL the last couple of hours I'm trying really hard to convince myselve the Solaris offensive there is not orchestrated.. but I can't.
It might ofcourse be the fresh MySQL users that Sun brought in on their platform that started out blogging but hey .. I`m paranoia right :)

Are they really trying to get at least a fraction of the MySQL community on Solaris. Do they really think they can ? Yes they lost a zillion of Solaris customers that were running a proprietary database to MySQL on Linux users ,, but why would they want to move back to a semi proprietary setup ?

According to Linuxjournal Alan Cox seems to think that ZFS is the only thing that is keeping Solaris alive. I don't think DTrace was a bigg mass tool that would convince the crowds to suddenly move to an other operating system.

So is Sun trying to Lock


  [Read more...]
MySQL 6.0 alpha on Open Solaris
Employee +0 Vote Up -0Vote Down

(Note: This post is relevant only if you want to have 'DTr ace' support in the MySQL server. Packages for Solaris are available at http://dev.mysql.com/downloads/.  You can install the MySQL packages for Solaris 10 on Open Solaris)

We shall use the Sun Studio C/C++ compilers and linkers to build MySQL 6.0 alpha on Open Solaris b98 on a x86 system.

  • Grab the MySQL 6.0 alpha tarball from here
  • Extract it
  • Go to the source root, and do the following: (The text following a '#' should be treated as comments)
    $ ./configure --enable-dtrace CC=cc CXX= CC --without-falcon --prefix=/export/home/amit/mysql60-install # MySQL 6.0 alpha contains DTrace probes. To enable it use

  •   [Read more...]
    MySQL 6.0 alpha on Open Solaris
    Employee +0 Vote Up -0Vote Down

    (Note: This post is relevant only if you want to have 'DTr ace' support in the MySQL server. Packages for Solaris are available at http://dev.mysql.com/downloads/.  You can install the MySQL packages for Solaris 10 on Open Solaris)

    We shall use the Sun Studio C/C++ compilers and linkers to build MySQL 6.0 alpha on Open Solaris b98 on a x86 system.

  • Grab the MySQL 6.0 alpha tarball from here
  • Extract it
  • Go to the source root, and do the following: (The text following a '#' should be treated as comments)
    $ ./configure --enable-dtrace CC=cc CXX= CC --without-falcon --prefix=/export/home/amit/mysql60-install # MySQL 6.0 alpha contains DTrace probes. To enable it

  •   [Read more...]
    MySQL 6.0 alpha on Open Solaris
    Employee +0 Vote Up -0Vote Down

    (Please note that you will have to build MySQL from sources only if you want to try out the DTrace facilities. Otherwise, binary packages are available for installation) 

    We shall use the Sun Studio C/C++ compilers and linkers to build MySQL 6.0 alpha on Open Solaris b98 on a x86 system.

  • Grab the MySQL 6.0 alpha tarball from here
  • Extract it
  • Go to the source root, and
  • ./configure --enable-dtrace --prefix=/export/home/amit/mysql60-install CC=cc CXX=CC --without-falcon
  • make
  • make install
  • Note:

    Please make sure that the location of the Sun tools are ahead in your PATH. GNU tools should be located later in the PATH. For eg.



      [Read more...]
    Response: DTrace MySQL & SQL statement
    Employee +0 Vote Up -0Vote Down
    A lot of comments on my last blog. Here is my response

    How can I get more details for each SQL statement?
    The second argument to dispatch_command is a pointer to the THD structure. It contains all sorts of information. You can dig for all the info you may ever need. Only issue is that we are now dealing with the internal structures and these may change for every release. So the script will not be portable. When I get a few minutes I'd blog a sample but your millage may vary.
    A better way to get these structures is using the embedded MySQL DTrace probes. These will expose the info you need. For details on the embedded DTrace probes and example scripts on how to get these details see the discussion thread on OpenSolaris DTrace Discuss Finally the tid was printed to give you some amount of



      [Read more...]
    Using DTrace to observe the SQL statements on a live running MySQL database
    Employee +0 Vote Up -0Vote Down
    DTrace allows you to instrument any live running application in production without the need of extra coding, application recompile or even an application restart. All you need is that the application is running on an OS that supports DTrace. Today Solaris, OpenSolaris, OS X and FreeBSD are a few that have DTrace built in.

    For example here is a D-script that instrument MySQL to observe the SQL statements that is being executed in production. Just a 3 line script like this can be extremely useful to observe a live MySQL database
    
    #!/usr/sbin/dtrace -qs
    pid$1::*dispatch_command*:entry
    {
        printf("%d::%s\n",tid,copyinstr(arg2));
    }
    
    You need to pass the pid of the mysql process as the first argument to this script.

    Here is a sample output from the script. We are observing the SQL statements that are executed to bring up the SugarCRM login




      [Read more...]
    DTrace + MySQL
    Employee +0 Vote Up -0Vote Down
    Some links on DTrace + MySQL: http://delicious.com/amitkumarsaha/dtrace%2Bmysql
    DTrace + MySQL
    Employee +0 Vote Up -0Vote Down
    Some links on DTrace + MySQL: http://delicious.com/amitkumarsaha/dtrace%2Bmysql
    Dtrace with MySQL 6.0.5 - on a Mac
    Employee +0 Vote Up -0Vote Down
    For the first time, MySQL includes Dtrace probes in the 6.0 release. On platforms that support Dtrace you can still find out a lot about what's happening, both in the Operating System kernel and in user processes, even without probes in the application. But carefully placed Dtrace probes inserted into the application code can give you a lot more information about what's going on, because they can be mapped to the application functionality. So far only a few probes have been included, but expect more to be added soon.

    I decided to take the new probes for a spin. Oh, and rather than do it on a Solaris system, I figured I'd give it a shot on my Intel Core 2 Duo MacBook Pro, since MacOS X 10.5 (Leopard) supports Dtrace.

    To begin with I pulled down and built MySQL 6.0.5 from Bit Keeper, thanks to some help from Brian Aker.

      [Read more...]
    Dtrace with MySQL 6.0.5 - on a Mac
    Employee +0 Vote Up -0Vote Down
    For the first time, MySQL includes Dtrace probes in the 6.0 release. On platforms that support Dtrace you can still find out a lot about what's happening, both in the Operating System kernel and in user processes, even without probes in the application. But carefully placed Dtrace probes inserted into the application code can give you a lot more information about what's going on, because they can be mapped to the application functionality. So far only a few probes have been included, but expect more to be added soon.

    I decided to take the new probes for a spin. Oh, and rather than do it on a Solaris system, I figured I'd give it a shot on my Intel Core 2 Duo MacBook Pro, since MacOS X 10.5 (Leopard) supports Dtrace.

    To begin with I pulled down and built MySQL 6.0.5 from Bit Keeper, thanks to some help from Brian Aker.

      [Read more...]
    Dtrace with MySQL 6.0.5 - on a Mac
    Employee +0 Vote Up -0Vote Down
    For the first time, MySQL includes Dtrace probes in the 6.0 release. On platforms that support Dtrace you can still find out a lot about what's happening, both in the Operating System kernel and in user processes, even without probes in the application. But carefully placed Dtrace probes inserted into the application code can give you a lot more information about what's going on, because they can be mapped to the application functionality. So far only a few probes have been included, but expect more to be added soon.

    I decided to take the new probes for a spin. Oh, and rather than do it on a Solaris system, I figured I'd give it a shot on my Intel Core 2 Duo MacBook Pro, since MacOS X 10.5 (Leopard) supports Dtrace.

    To begin with I pulled down and built MySQL 6.0.5 from Bit Keeper, thanks to some help from Brian Aker.

      [Read more...]
    PHP dtrace extension for Cool Stack 1.2
    Employee +0 Vote Up -0Vote Down

    We have fixed the issue with the PHP dtrace extension not working in Cool Stack 1.2. As I mentioned in my announcement post, we had already identified the issue but didn't have time to fix it before the release. The issue was that /usr/ccs/bin/ld was being used to do the linking but this doesn't work for dtrace as some initialization code needs to be called from the .init section and this is not setup correctly if we don't use 'cc' to do the linking (rather than 'ld'). 

    So a simple addition to the configure line:
    LD="cc"

    did the trick.

    We now have two files : dtrace_1.2_sparc.so and dtrace_1.2_x86.so posted.



      [Read more...]
    PHP dtrace extension for Cool Stack 1.2
    Employee +0 Vote Up -0Vote Down

    We have fixed the issue with the PHP dtrace extension not working in Cool Stack 1.2. As I mentioned in my announcement post, we had already identified the issue but didn't have time to fix it before the release. The issue was that /usr/ccs/bin/ld was being used to do the linking but this doesn't work for dtrace as some initialization code needs to be called from the .init section and this is not setup correctly if we don't use 'cc' to do the linking (rather than 'ld'). 

    So a simple addition to the configure line:
    LD="cc"

    did the trick.

    We now have two files : dtrace_1.2_sparc.so and dtrace_1.2_x86.so posted.



      [Read more...]
    PHP dtrace extension for Cool Stack 1.2
    Employee +0 Vote Up -0Vote Down

    We have fixed the issue with the PHP dtrace extension not working in Cool Stack 1.2. As I mentioned in my announcement post, we had already identified the issue but didn't have time to fix it before the release. The issue was that /usr/ccs/bin/ld was being used to do the linking but this doesn't work for dtrace as some initialization code needs to be called from the .init section and this is not setup correctly if we don't use 'cc' to do the linking (rather than 'ld'). 

    So a simple addition to the configure line:
    LD="cc"

    did the trick.

    We now have two files : dtrace_1.2_sparc.so and dtrace_1.2_x86.so posted.



      [Read more...]
    Debugging AMP
    Employee +0 Vote Up -0Vote Down

    In a previous post, I mentioned the availability of the dtrace extension for Cool Stack's PHP.  Using this extension and the Cool Stack MySQL, it is possible to analyze the performance of your application running on this stack. At JavaOne, we demoed this using the open source MediaWiki and SugarCRM applications.  dtrace is especially useful in analyzing complex multi-tier applications like AMP. Thanks to Angelo Rajadurai for the creation of the scripts that I describe below.

    Analyzing PHP calls

    So, let's look at a simple dtrace script that counts how many times a particular PHP function is called :

    #!/usr/sbin/dtrace -Zqs

    php*:::function-entry
    /arg0/
    {
            @[copyinstr(arg0)]=count();
    }

    You can copy










      [Read more...]
    DTrace meets the AMP (Apache MySQL PHP) stack
    Employee +0 Vote Up -0Vote Down

    During JavaOne this year Rags and I did a hands on lab on DTrace. The topic was "Using DTrace on Java and other Web 2.0 Languages in Solaris". Due to some unforeseen reason the lab was scheduled from 8:45 PM to 10:45 PM (Yes PM) and that to on the day of the big party at JavaOne. So I was expecting to be speaking to an empty room but lo and behold we had close to 100 engineers ( a few pretty drunk) and most stayed until the finished the

      [Read more...]
    Dtrace support for PHP
    Employee +0 Vote Up -0Vote Down

    Dtrace is one of the coolest things in Solaris 10, adding great observability to applications. A Dtrace provider for PHP that adds probes to function entry and exit points has long been available. I finally got around to integrating this with the php in Cool Stack. 

    Bryan Cantrill has some excellent examples of how to use dtrace to trace through your php code, down to the system libraries and kernel (if you want to go that far !) .

    Instructions for installing the php dtrace extension

    1. Download the shared library for the extension :

        dtrace.so.x86.bz2

       


      [Read more...]
    Previous 30 Newer Entries Showing entries 31 to 60 of 60

    Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

    Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.