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

feat: supports changing number of executing cpu cores for manager api #1569

Merged
merged 4 commits into from
Mar 10, 2021

Conversation

bisakhmondal
Copy link
Member

Please answer these questions before submitting a pull request


New feature or improvement

Supports changing the number of os threads attached to the goroutines.

For performance reason, if in the configuration file, the defined max_cpu is greater than the number of available cpu cores (including hyperthreading), the manager api will stick to the max available cores. As it has a certain limit to boost the performance since the context switching of goroutines from the same os thread is a lot faster than goroutines from different threads.

Copy link
Contributor

@starsz starsz left a comment

Choose a reason for hiding this comment

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

Pretty good.Thank you for your contribution.

api/internal/conf/conf.go Show resolved Hide resolved
Copy link
Member

@nic-chen nic-chen left a comment

Choose a reason for hiding this comment

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

CI failed. please use go fmt to format the code.

api/internal/conf/conf.go Outdated Show resolved Hide resolved
bisakhmondal and others added 2 commits March 10, 2021 11:05
Co-authored-by: nic-chen <33000667+nic-chen@users.noreply.github.com>
@codecov-io
Copy link

Codecov Report

Merging #1569 (40dad6b) into master (c8b235b) will increase coverage by 4.05%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1569      +/-   ##
==========================================
+ Coverage   69.15%   73.21%   +4.05%     
==========================================
  Files          49       86      +37     
  Lines        3164     2322     -842     
  Branches        0      584     +584     
==========================================
- Hits         2188     1700     -488     
+ Misses        728      622     -106     
+ Partials      248        0     -248     
Flag Coverage Δ
backend-e2e-test ?
backend-e2e-test-ginkgo ?
backend-unit-test ?
frontend-e2e-test 73.21% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
api/internal/log/log.go
api/internal/filter/authentication.go
api/internal/filter/request_id.go
api/internal/core/store/validate.go
api/internal/route.go
api/internal/core/store/store_mock.go
api/internal/utils/utils.go
...l/handler/route_online_debug/route_online_debug.go
api/internal/core/entity/entity.go
api/internal/handler/label/label.go
... and 124 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c8b235b...40dad6b. Read the comment docs.

Copy link
Member

@nic-chen nic-chen left a comment

Choose a reason for hiding this comment

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

LGTM

@starsz starsz merged commit e8256c2 into apache:master Mar 10, 2021
@nic-chen
Copy link
Member

@bisakhmondal merged, thanks a lot.

@bisakhmondal
Copy link
Member Author

You're welcome. Thanks for the review guys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature: support custom CPU quantity used for manager api
4 participants