Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add details about sysbench and the SQL Plan Cache #11011

Merged
merged 6 commits into from Nov 16, 2022

Conversation

dveeden
Copy link
Contributor

@dveeden dveeden commented Oct 25, 2022

What is changed, added or deleted? (Required)

Add details about the SQL Plan Cache and sysbench

Which TiDB version(s) do your changes apply to? (Required)

  • master (the latest development version)
  • v6.4 (TiDB 6.4 versions)
  • v6.3 (TiDB 6.3 versions)
  • v6.1 (TiDB 6.1 versions)
  • v5.4 (TiDB 5.4 versions)
  • v5.3 (TiDB 5.3 versions)
  • v5.2 (TiDB 5.2 versions)
  • v5.1 (TiDB 5.1 versions)
  • v5.0 (TiDB 5.0 versions)

What is the related PR or file link(s)?

  • This PR is translated from:
  • Other reference link(s):

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Oct 25, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • shichun-0415

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added missing-translation-status This PR does not have translation status info. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 25, 2022

- Download the modified [oltp_common.lua](https://raw.githubusercontent.com/pingcap/tidb-bench/master/sysbench/sysbench-patch/oltp_common.lua) file for TiDB and overwrite the `/usr/share/sysbench/oltp_common.lua` file with it.
- In `/usr/share/sysbench/oltp_common.lua`, move the lines [235](https://github.com/akopytov/sysbench/blob/1.0.14/src/lua/oltp_common.lua#L235)-[240](https://github.com/akopytov/sysbench/blob/1.0.14/src/lua/oltp_common.lua#L240) to be right behind the line 198.
- In `/usr/share/sysbench/oltp_common.lua`, move the lines [235-240](https://github.com/akopytov/sysbench/blob/1.0.20/src/lua/oltp_common.lua#L235-L240) to be right behind the line 198.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/akopytov/sysbench/blob/ebf1c90da05dea94648165e4f149abc20c979557/src/lua/oltp_common.lua#L235-L240

$ sysbench oltp_read_only help
sysbench 1.1.0-df89d34 (using bundled LuaJIT 2.1.0-beta3)

oltp_read_only options:
...
  --create_secondary[=on|off]   Create a secondary index in addition to the PRIMARY KEY [on]
...

On the line above that there is the link to https://raw.githubusercontent.com/pingcap/tidb-bench/master/sysbench/sysbench-patch/oltp_common.lua I think it would be good to either update that file to be based on 1.0.20. Maybe upload versions for both 1.0.14 and 1.0.20?
Maybe we can advise to use --create_secondary=off and then later create the indexes?
Maybe we should contribute an improvement to sysbench, e.g. an --create-indexes-at-the-end=on ? We might have other things to add as well like support for AUTO_RANDOM?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the warmup command was called prewarm in older versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dbsid what do you think about updating the oltp_common.lua file for 1.0.20?

@ti-chi-bot ti-chi-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 26, 2022
@shichun-0415 shichun-0415 added translation/doing This PR's assignee is translating this PR. area/diagnosis Indicates that the Issue or PR belongs to the area of diagnosis and monitoring. needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. needs-cherry-pick-release-6.3 and removed missing-translation-status This PR does not have translation status info. labels Oct 26, 2022
@shichun-0415 shichun-0415 self-assigned this Oct 26, 2022
@dveeden dveeden requested a review from yiwen92 October 26, 2022 08:31
Copy link

@yiwen92 yiwen92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@shichun-0415 shichun-0415 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest LGTM

sql-prepared-plan-cache.md Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 16, 2022
@shichun-0415
Copy link
Contributor

/verify

Co-authored-by: shichun-0415 <89768198+shichun-0415@users.noreply.github.com>
@shichun-0415
Copy link
Contributor

/status LGT2

@ti-chi-bot ti-chi-bot added the status/LGT2 Indicates that a PR has LGTM 2. label Nov 16, 2022
@shichun-0415
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 65732cd

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 16, 2022
@ti-chi-bot ti-chi-bot merged commit 10cd657 into pingcap:master Nov 16, 2022
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #11337.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #11338.

@shichun-0415 shichun-0415 added translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. and removed translation/doing This PR's assignee is translating this PR. labels Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/diagnosis Indicates that the Issue or PR belongs to the area of diagnosis and monitoring. needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1. status/LGT2 Indicates that a PR has LGTM 2. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants