MySQL, with SHOW PROFILE and updated INFORMATION_SCHEMA, built from the Community tree

I just built mysql-5.0-community, on my T7200 with 2GB of RAM (on Fedora Core 6), and it only took a mere:

real    7m51.127s

user    3m13.836s

sys     2m19.803s

The obligatory make test was run, and that was also pretty quick:

All 455 tests were successful.

The servers were restarted 109 times

Spent 1134.052 seconds actually executing testcases

Maybe we could have a competition to see how fast MySQL builds (under 8 minutes) and tests (under 19 minutes), something similar to the 7-second Linux kernel compile. With that it looks like 5.0.37 might make its way to the surface really soon now, since 5.0.35 was pending a release, before we canned that.

Why is MySQL Community Server 5.0.37 significant? Because it contains Jeremy Cole’s SHOW PROFILE feature. Notice how thats not just a patch any longer, its a feature, from the community, that’s been implemented in the MySQL Community Server release. Chad Miller (in Community Engineering) also extended the then patch further, and now you can also get said information via the INFORMATION_SCHEMA (look at the PROFILING table in the INFORMATION_SCHEMA).

Profiling isn’t enabled by default (check via: show variables like 'profiling';), so you’d do well to set profiling='on';. Once that is done, you can just execute SHOW PROFILE; to be greeted by the feature. Using the INFORMATION_SCHEMA database, and something like: select duration,source_function,source_file from profiling; I can see how much time MySQL takes to execute a function like the mysql_select or how long it takes to do open_tables – best of all, I can see which source file I might want to edit if need be.

I’m told this does not work on Windows, or Solaris (?), because they don’t have the getrusage() syscall, but it should probably work just fine on OS X based MySQL servers.

Technorati Tags: , , , , ,

Related posts:

  1. Jono Bacon speaks to Oracle on the MySQL Community
  2. Lightning talks with Community Contributors
  3. And it built!
  4. MySQL with yaSSL vulnerability
  5. MySQL Community Dinner a great success
  • http://datacharmer.blogspot.com/ Giuseppe Maxia

    To add some hands on experience, there is a blog post telling more:
    http://datacharmer.blogspot.com/2007/03/test-driving-show-profiles.html

    And a documentation stub on the Forge
    http://forge.mysql.com/wiki/ShowProfileDocs

    I don’t do Windows, but I can tell you that under Linux and Mac OS X it works just fine.

    Cheers

    Giuseppe

  • http://www.librarything.com John

    Very cool. Does this mean there’s a new binary release of the community edition coming up? Any idea when? And what happened o 5.0.35? This is the first I’ve heard of it being canned.

  • http://www.bytebot.net/ byte

    Thanks for the links Giuseppe.

    @John: I’m not one to give dates, but I believe you’ll see it sometime this week if not next. Going by the fact that the last release was a source only release, this would most definitely be a binary + source release

    5.0.35 was delayed because of a security bug, hence 5.0.37 is born!

  • http://www.librarything.com John

    Great, thanks much for the info, really appreciated. I’ve been looking forward to a specific replication-related fix, and was weighing the possibility of compiling from source. I know just enough to be dangerous along those lines, though — glad we’ll have one from the pros pretty soon :-)

  • Denis F. Latypoff

    I’ve never used mysql binary packages and don’t want to do that. I tried to install 5.0.37 to all my centos’es from sources and startups are failed on all servers, I went back use 5.0.33.
    New strace says that mysql hangs on rt_sigsuspend([HUP INT QUIT PIPE ALRM TERM TSTP]… :

    070312 20:56:11 InnoDB: Setting file /var/lib/mysql/ibdata3 size to 1024 MB
    InnoDB: Database physically writes the file full: wait…
    InnoDB: Progress in MB: 100 200 300 400 500 600 700 800 900 1000
    070312 20:56:49 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
    InnoDB: Setting log file ./ib_logfile0 size to 64 MB
    InnoDB: Database physically writes the file full: wait…
    070312 20:56:52 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
    InnoDB: Setting log file ./ib_logfile1 size to 64 MB
    InnoDB: Database physically writes the file full: wait…

    and nothing.. no mysql.sock created, no pidfile created.
    5.0.33 continued to run with the following log:

    InnoDB: Doublewrite buffer not found: creating new
    InnoDB: Doublewrite buffer created
    InnoDB: Creating foreign key constraint system tables
    InnoDB: Foreign key constraint system tables created
    070312 20:56:55 InnoDB: Started; log sequence number 0 0
    070312 20:56:55 [Note] /usr/libexec/mysqld: ready for connections.
    Version: ‘5.0.33-c2′ socket: ‘/var/lib/mysql/mysql.sock’ port: 3306 Source distribution

    Linux c2 2.6.9-42.0.10.EL #1 Tue Feb 27 09:24:42 EST 2007 i686 i686 i386 GNU/Linux
    I don’t need help, I just reported bug ;)

  • http://datacharmer.blogspot.com/ Giuseppe Maxia

    To add some hands on experience, there is a blog post telling more:
    http://datacharmer.blogspot.com/2007/03/test-dr

    And a documentation stub on the Forge
    http://forge.mysql.com/wiki/ShowProfileDocs

    I don't do Windows, but I can tell you that under Linux and Mac OS X it works just fine.

    Cheers

    Giuseppe


i