Announcement

Announcement Module
Collapse
No announcement yet.

Profiling

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Profiling

    hi,

    today i reactivated some of my older goodies, but for some reason i cannot get the profiling to work.
    information_schema.profiling sticks empty even if i manually start/end profiling SET PROFILING = 1 ... SET PROFILING = 0.

    seems like profiling is somehow deactivated?

    and long_query_time = 0 with pt-query-digest is the better way to profile now?

    schnix

  • #2
    What does SELECT @@version, @@version_comment and SHOW ENGINES gives?
    Our documentation has a lot of answers about common questions on Percona software, have you checked there before posting that question here? http://www.percona.com/forums/core/i...lies/smile.png

    Join us at the annual Percona Live MySQL Users Conference - http://www.percona.com/live/mysql-conference-2014/

    Comment


    • #3
      SELECT @@version, @@version_comment

      5.5.15-55-log Percona Server (GPL), Release 21.0



      SHOW ENGINES

      Engine Support Comment Transactions XA Savepoints
      MRG_MYISAM YES Collection of identical MyISAM tables NO NO NO
      CSV YES CSV storage engine NO NO NO
      MyISAM YES MyISAM storage engine NO NO NO
      BLACKHOLE YES /dev/null storage engine (anything you write to it... NO NO NO
      MEMORY YES Hash based, stored in memory, useful for temporary... NO NO NO
      InnoDB DEFAULT Percona-XtraDB, Supports transactions, row-level l... YES YES YES
      ARCHIVE YES Archive storage engine NO NO NO
      FEDERATED NO Federated MySQL storage engine NULL NULL NULL
      PERFORMANCE_SCHEMA YES Performance Schema NO NO NO


      thx for reply

      Comment


      • #4
        I can't reproduce your results on this server:

        Server version: 5.5.15-rel21.0-log Percona Server with XtraDB (GPL), Release rel21.0, Revision 158

        This is a slightly different build than yours, but I'm at a conference and can't download the exact version you're using. Can you try this exact sequence and just confirm what you get?


        mysql> set profiling=1;Query OK, 0 rows affected (0.00 sec)mysql> select 1;+---+| 1 |+---+| 1 |+---+1 row in set (0.00 sec)mysql> show profile for query 1;+----------------------+----------+| Status | Duration |+----------------------+----------+| starting | 0.000064 || checking permissions | 0.000013 || Opening tables | 0.000022 || init | 0.000017 || optimizing | 0.000009 || executing | 0.000033 || end | 0.000044 || query end | 0.000009 || closing tables | 0.000009 || freeing items | 0.000058 || logging slow query | 0.000008 || cleaning up | 0.000008 |+----------------------+----------+12 rows in set (0.00 sec)

        Comment


        • #5
          mysql> set profiling=1;
          Query OK, 0 rows affected (0.00 sec)

          mysql> select 1;
          +---+
          | 1 |
          +---+
          | 1 |
          +---+
          1 row in set (0.00 sec)

          mysql> show profile for query 1;
          +--------------------------------+----------+
          | Status | Duration |
          +--------------------------------+----------+
          | starting | 0.000415 |
          | Waiting for query cache lock | 0.000060 |
          | Waiting on query cache mutex | 0.000055 |
          | checking query cache for query | 0.000277 |
          | checking permissions | 0.000125 |
          | Opening tables | 0.000095 |
          | init | 0.000084 |
          | optimizing | 0.000070 |
          | executing | 0.000090 |
          | end | 0.000062 |
          | query end | 0.000056 |
          | closing tables | 0.000054 |
          | freeing items | 0.000170 |
          | logging slow query | 0.000084 |
          | logging slow query | 0.000269 |
          | cleaning up | 0.000058 |
          +--------------------------------+----------+
          16 rows in set (0.00 sec)



          looks like the profiling works, but i suspect it somewhere wrong?
          my information_schema.profiling table is nevertheless empty...

          in older times i used:
          my $SQL = qq{INSERT INTO %s (`Search`,`Useragent`,`Queries`,`time_MySQL`,`time _Server`,` Size`,`CDate`) VALUES ( %s, %s, ( (SELECT QUERY_ID FROM information_schema.profiling ORDER BY QUERY_ID DESC LIMIT 1) || 1 ), ( (SELECT SUM(duration) FROM information_schema.profiling ) || 0.00001 ), %f, %u, NOW() );};

          is it old school?

          thx
          schnix

          Comment


          • #6
            Did you build the server yourself? The version you mentioned isn't present here: http://www.percona.com/downloads/Percona-Server-5.5/Percona- Server-5.5.15-21.0/Linux/binary/

            I tried again with 5.5.15-rel21.0-log which is the latest build I see on our site, and there is data in the I_S table. So I still can't reproduce your results. What platform are you on (what OS), is it 32-bit or 64-bit, and how did you install it?

            Comment


            • #7
              my fault, i started profiling too late in the script, i really feel ashamed ...
              sorry for the trouble, everything works like a charm.

              my setup is debian squeeze 32bit on virtual box, i used aptitude to install percona 5.5.15 and upgraded it recently to -160...


              so this can be closed or deleted forever
              schnix

              Comment

              Working...
              X