<?xml version="1.0" encoding="utf-8"?>
<launchpad-bug id="611878">
  <date_last_updated>2012-05-15 18:38:21.568895+00:00</date_last_updated>
  <api_links>
    <bug_api_link>https://api.launchpad.net/1.0/bugs/611878</bug_api_link>
    <bug_owner_link>https://api.launchpad.net/1.0/~damientournoud</bug_owner_link>
    <milestone_link>https://api.launchpad.net/1.0/maria/+milestone/5.2</milestone_link>
    <linked_branches_collection_link>https://api.launchpad.net/1.0/bugs/611878/linked_branches</linked_branches_collection_link>
    <activity_link>https://api.launchpad.net/1.0/bugs/611878/activity</activity_link>
  </api_links>
  <bug_web_link>https://bugs.launchpad.net/bugs/611878</bug_web_link>
  <owner>Damien Tournoud</owner>
  <assignee></assignee>
  <milestone_title>Maria 5.2</milestone_title>
  <duplicate_link></duplicate_link>
  <duplicate_bug_id></duplicate_bug_id>
  <title>user_statistics.busy_time is unreliable</title>
  <status>New</status>
  <importance>Undecided</importance>
  <created>2010-07-30 22:03:06.177312+00:00</created>
  <description>
<![CDATA[I was testing MariaDB 5.2.1-beta (on Debian 5.0), and bumped into the following weird behavior of user_statistics.busy_time: the value of this column seems completely unreliable and randomly increases at some points in time:

MariaDB [(none)]> SELECT CONNECTED_TIME,BUSY_TIME,CPU_TIME FROM information_schema.user_statistics WHERE USER='core_d7';
+----------------+------------------+------------------+
| CONNECTED_TIME | BUSY_TIME        | CPU_TIME         |
+----------------+------------------+------------------+
|           2887 | 36893488147880.9 | 237.741877899973 |

later...

|           2919 | 36893488147887.3 | 241.586389299972 |

later...

|           2921 | 36893488147888.2 | 242.004482199972 |

and now:

|           3144 | 55340232221635 | 268.829147599973 |

I don't have any additional information information at this point, just wanted to report the behavior in case it rings a bell for someone.

]]>  </description>
  <activities>
    <activity datechanged="2010-07-30T22:03:06.177312+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[]]>      </newvalue>
      <whatchanged>bug</whatchanged>
      <person>Damien Tournoud</person>
      <message>added bug</message>
    </activity>
    <activity datechanged="2010-07-31T09:51:00.861974+00:00">
      <oldvalue>
<![CDATA[I was testing MariaDB 5.3.1-beta (on Debian 5.0), and bumped into the following weird behavior of user_statistics.busy_time: the value of this column seems completely unreliable and randomly increases at some points in time:

MariaDB [(none)]> SELECT CONNECTED_TIME,BUSY_TIME,CPU_TIME FROM information_schema.user_statistics WHERE USER='core_d7';
+----------------+------------------+------------------+
| CONNECTED_TIME | BUSY_TIME        | CPU_TIME         |
+----------------+------------------+------------------+
|           2887 | 36893488147880.9 | 237.741877899973 |

later...

|           2919 | 36893488147887.3 | 241.586389299972 |

later...

|           2921 | 36893488147888.2 | 242.004482199972 |

and now:

|           3144 | 55340232221635 | 268.829147599973 |

I don't have any additional information information at this point, just wanted to report the behavior in case it rings a bell for someone.]]>      </oldvalue>
      <newvalue>
<![CDATA[I was testing MariaDB 5.2.1-beta (on Debian 5.0), and bumped into the following weird behavior of user_statistics.busy_time: the value of this column seems completely unreliable and randomly increases at some points in time:

MariaDB [(none)]> SELECT CONNECTED_TIME,BUSY_TIME,CPU_TIME FROM information_schema.user_statistics WHERE USER='core_d7';
+----------------+------------------+------------------+
| CONNECTED_TIME | BUSY_TIME        | CPU_TIME         |
+----------------+------------------+------------------+
|           2887 | 36893488147880.9 | 237.741877899973 |

later...

|           2919 | 36893488147887.3 | 241.586389299972 |

later...

|           2921 | 36893488147888.2 | 242.004482199972 |

and now:

|           3144 | 55340232221635 | 268.829147599973 |

I don't have any additional information information at this point, just wanted to report the behavior in case it rings a bell for someone.

]]>      </newvalue>
      <whatchanged>description</whatchanged>
      <person>Damien Tournoud</person>
      <message></message>
    </activity>
    <activity datechanged="2010-11-30T16:38:49.512096+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[5.2]]>      </newvalue>
      <whatchanged>maria: milestone</whatchanged>
      <person>Sergei</person>
      <message></message>
    </activity>
    <activity datechanged="2012-05-15T18:38:21.259436+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[]]>      </newvalue>
      <whatchanged>bug</whatchanged>
      <person>Anton Khalikov</person>
      <message>added subscriber Anton Khalikov</message>
    </activity>
  </activities>
  <comments>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/611878/comments/0" datecreated="2010-07-30T22:03:06.177312+00:00">
      <person>Damien Tournoud</person>
      <subject>
<![CDATA[user_statistics.busy_time is unreliable]]>      </subject>
      <content>
<![CDATA[I was testing MariaDB 5.3.1-beta (on Debian 5.0), and bumped into the following weird behavior of user_statistics.busy_time: the value of this column seems completely unreliable and randomly increases at some points in time:

MariaDB [(none)]> SELECT CONNECTED_TIME,BUSY_TIME,CPU_TIME FROM information_schema.user_statistics WHERE USER='core_d7';
+----------------+------------------+------------------+
| CONNECTED_TIME | BUSY_TIME        | CPU_TIME         |
+----------------+------------------+------------------+
|           2887 | 36893488147880.9 | 237.741877899973 |

later...

|           2919 | 36893488147887.3 | 241.586389299972 |

later...

|           2921 | 36893488147888.2 | 242.004482199972 |

and now:

|           3144 | 55340232221635 | 268.829147599973 |

I don't have any additional information information at this point, just wanted to report the behavior in case it rings a bell for someone.]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/611878/comments/1" datecreated="2010-07-31T08:27:20.980128+00:00">
      <person>Kristian Nielsen</person>
      <subject>
<![CDATA[Re: user_statistics.busy_time is unreliable]]>      </subject>
      <content>
<![CDATA[I believe the reporter meant to say that MariaDB 5._2_.1 beta was being tested.]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/611878/comments/2" datecreated="2010-07-31T09:51:38.156923+00:00">
      <person>Damien Tournoud</person>
      <subject>
<![CDATA[Re: user_statistics.busy_time is unreliable]]>      </subject>
      <content>
<![CDATA[Indeed, that was 5.2.1-beta (Debian 5.0 build).]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/611878/comments/3" datecreated="2010-08-05T09:42:16.431100+00:00">
      <person>Damien Tournoud</person>
      <subject>
<![CDATA[Re: user_statistics.busy_time is unreliable]]>      </subject>
      <content>
<![CDATA[Anything I could do to help this go forward?]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/611878/comments/4" datecreated="2012-05-15T18:35:08.461116+00:00">
      <person>Anton Khalikov</person>
      <subject>
<![CDATA[Re: user_statistics.busy_time is unreliable]]>      </subject>
      <content>
<![CDATA[I can confirm this bug. We collect user statistics and run "SELECT * FROM INFORMATION_SCHEMA.USER_STATISTICS; FLUSH USER_STATISTICS" every 5 minutes. This is what I've got just before the end of a 5 minute interval:

MariaDB [(none)]> select USER, TOTAL_CONNECTIONS, CPU_TIME, BYTES_RECEIVED, BYTES_SENT, ROWS_READ, ROWS_SENT, ROWS_DELETED, ROWS_INSERTED, ROWS_UPDATED, SELECT_COMMANDS, UPDATE_COMMANDS, OTHER_COMMANDS from INFORMATION_SCHEMA.USER_STATISTICS order by CPU_TIME desc limit 0,1\G
*************************** 1. row ***************************
             USER: u4740
TOTAL_CONNECTIONS: 3311
         CPU_TIME: 168767.2010919
   BYTES_RECEIVED: 722875
       BYTES_SENT: 15747206
        ROWS_READ: 73910638
        ROWS_SENT: 13124
     ROWS_DELETED: 0
    ROWS_INSERTED: 5749
     ROWS_UPDATED: 2982
  SELECT_COMMANDS: 1466
  UPDATE_COMMANDS: 3360
   OTHER_COMMANDS: 3311
1 row in set (0.00 sec)


and right after FLUSH again:

MariaDB [(none)]> select USER, TOTAL_CONNECTIONS, CPU_TIME, BYTES_RECEIVED, BYTES_SENT, ROWS_READ, ROWS_SENT, ROWS_DELETED, ROWS_INSERTED, ROWS_UPDATED, SELECT_COMMANDS, UPDATE_COMMANDS, OTHER_COMMANDS from INFORMATION_SCHEMA.USER_STATISTICS order by CPU_TIME desc limit 0,1\G
*************************** 1. row ***************************
             USER: u4740
TOTAL_CONNECTIONS: 31
         CPU_TIME: 827.8829815
   BYTES_RECEIVED: 8945
       BYTES_SENT: 4590920
        ROWS_READ: 177196
        ROWS_SENT: 1709
     ROWS_DELETED: 0
    ROWS_INSERTED: 0
     ROWS_UPDATED: 27
  SELECT_COMMANDS: 7
  UPDATE_COMMANDS: 30
   OTHER_COMMANDS: 30
1 row in set (0.00 sec)

So we see here CPU_TIME has been reset but increased to over 800 units within a couple of seconds. And it reached about 170000 units within 5 minutes. Either units are milliseconds or there is something really wrong.

Could anyone confirm ?

I use Debian 6 on amd64, MariaDB 5.2.12]]>      </content>
    </comment>
  </comments>
</launchpad-bug>
