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

*: optimize MemTracker object allocation in point get #26064

Merged
merged 3 commits into from
Jul 12, 2021

Conversation

tiancaiamao
Copy link
Contributor

What problem does this PR solve?

Optimize memory tracker object allocation.

After TxnInfo, TSSet, RuntimeStatsColl and so on, memory tracker allocation would be the next.

Problem Summary:

Improve point get performance for #25573

What's Changed:

How it Works:

Avoid memory tracker object allocation in the point get query.

Check List

Tests

  • Manual test (add detailed scripts or steps below)
cd session
go test -test.run XXX -bench BenchmarkPreparedPointGet  -test.benchmem -test.benchtime 30s  -test.memprofile mem.out

Before vs After:

BenchmarkPreparedPointGet-16    	 3750292	      9442 ns/op	    7830 B/op	     101 allocs/op
BenchmarkPreparedPointGet-16    	 3915133	      9125 ns/op	    7926 B/op	      97 allocs/op

Release note

  • No release note

@ti-chi-bot ti-chi-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 8, 2021
@github-actions github-actions bot added the sig/execution SIG execution label Jul 8, 2021
@tiancaiamao tiancaiamao requested review from tangenta and removed request for eurekaka July 9, 2021 10:08
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 12, 2021
@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • guo-shaoge
  • tangenta

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 status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jul 12, 2021
@tiancaiamao
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 0ae8a6e

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jul 12, 2021
@tiancaiamao tiancaiamao merged commit eaa0ef4 into pingcap:master Jul 12, 2021
@tiancaiamao tiancaiamao deleted the optimize-mem-tracker branch July 12, 2021 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/execution SIG execution 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/LGT2 Indicates that a PR has LGTM 2. type/performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants