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

Performance : Remove calls to clock() in trx_start_low

    XMLWordPrintable

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

        1. remove_clock.txt
          6 kB
          Vladislav Vaintroub
        2. with_clock.txt
          6 kB
          Vladislav Vaintroub

        Activity

          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.