Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-12345

Performance : Remove calls to clock() in trx_start_low

Details

    Description

      The point-select sysbench benchmark I ran recently on 10.2 shows rather high time spent in
      high resolution timer syscalls (clock_gettime on Linux, and QueryPerformanceCounter on Windows)

      The inspection reveals that clock() call introduced inside trx_start_low by this patch https://github.com/MariaDB/server/commit/74961760a4837d2deb33336329c28cf9ad9b4e9e is responsible for the most calls (also, in 10.2, clock() was erroneously done twice).

      The call can be replaced by the value of THD::start_utime.

      Attachments

        Activity

          wlad Vladislav Vaintroub created issue -
          wlad Vladislav Vaintroub made changes -
          Field Original Value New Value
          Attachment 10.2.callgraph.G.txt.zip [ 43474 ]
          marko Marko Mäkelä made changes -
          Status Open [ 1 ] Confirmed [ 10101 ]
          marko Marko Mäkelä made changes -
          Fix Version/s 10.1.23 [ 22503 ]
          Fix Version/s 10.2 [ 14601 ]
          wlad Vladislav Vaintroub made changes -
          Description The point-select sysbench benchmark I ran recently on 10.2 shows rather high time spent in
          high resolution timer syscalls (clock_gettime on Linux, and QueryPerformanceCounter on Windows) - 2-3% of the CPU samples are spent inside this function.

          The inspection reveals that clock() call introduced inside trx_start_low by this patch https://github.com/MariaDB/server/commit/74961760a4837d2deb33336329c28cf9ad9b4e9e is responsible for the most calls (also, in 10.2, clock() was erroneously done twice).

          The call can be replaced by the value of THD::start_utime.
          The point-select sysbench benchmark I ran recently on 10.2 shows rather high time spent in
          high resolution timer syscalls (clock_gettime on Linux, and QueryPerformanceCounter on Windows)

          The inspection reveals that clock() call introduced inside trx_start_low by this patch https://github.com/MariaDB/server/commit/74961760a4837d2deb33336329c28cf9ad9b4e9e is responsible for the most calls (also, in 10.2, clock() was erroneously done twice).

          The call can be replaced by the value of THD::start_utime.
          wlad Vladislav Vaintroub made changes -
          Attachment remove_clock.txt [ 43480 ]
          Attachment with_clock.txt [ 43481 ]
          wlad Vladislav Vaintroub made changes -
          Fix Version/s 10.2 [ 14601 ]
          Resolution Fixed [ 1 ]
          Status Confirmed [ 10101 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 80096 ] MariaDB v4 [ 151845 ]
          jplindst Jan Lindström (Inactive) made changes -
          jplindst Jan Lindström (Inactive) made changes -

          People

            wlad Vladislav Vaintroub
            wlad Vladislav Vaintroub
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.