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

etcdserver: Reduce the ChanLen of watchResponse,and reduce its memory usage #11987

Merged
merged 1 commit into from
Jun 10, 2020
Merged

etcdserver: Reduce the ChanLen of watchResponse,and reduce its memory usage #11987

merged 1 commit into from
Jun 10, 2020

Conversation

cfc4n
Copy link
Contributor

@cfc4n cfc4n commented Jun 7, 2020

128 seems to be enough.
Sometimes the consumption speed is more than the production speed.

Fixes #11906

@cfc4n cfc4n changed the title Reduce the ChanLen of watchResponse,and reduce its memory usage etcdserver: Reduce the ChanLen of watchResponse,and reduce its memory usage Jun 7, 2020
@xiang90
Copy link
Contributor

xiang90 commented Jun 10, 2020

Can you update the comment above the const definition with your reasoning.

128 seems to be enough.
Sometimes the consumption speed is more than the production speed.

See #11906 for more detail.
@codecov-commenter
Copy link

codecov-commenter commented Jun 10, 2020

Codecov Report

Merging #11987 into master will increase coverage by 0.53%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11987      +/-   ##
==========================================
+ Coverage   65.96%   66.50%   +0.53%     
==========================================
  Files         403      403              
  Lines       37306    37320      +14     
==========================================
+ Hits        24608    24818     +210     
+ Misses      11182    10990     -192     
+ Partials     1516     1512       -4     
Impacted Files Coverage Δ
mvcc/watchable_store.go 92.90% <ø> (+8.86%) ⬆️
auth/options.go 67.50% <0.00%> (-25.00%) ⬇️
client/keys.go 76.88% <0.00%> (-14.58%) ⬇️
pkg/adt/interval_tree.go 85.96% <0.00%> (-1.26%) ⬇️
clientv3/watch.go 90.52% <0.00%> (-1.01%) ⬇️
clientv3/retry_interceptor.go 68.62% <0.00%> (-0.99%) ⬇️
pkg/netutil/netutil.go 68.03% <0.00%> (-0.82%) ⬇️
etcdserver/api/v3rpc/watch.go 83.56% <0.00%> (-0.70%) ⬇️
etcdserver/cluster_util.go 64.88% <0.00%> (-0.45%) ⬇️
etcdserver/v3_server.go 66.47% <0.00%> (-0.20%) ⬇️
... and 21 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 49f91d6...2e6c39e. Read the comment docs.

@cfc4n
Copy link
Contributor Author

cfc4n commented Jun 10, 2020

Can you update the comment above the const definition with your reasoning.

Done. thanks for review.

@xiang90 xiang90 merged commit 26f6aee into etcd-io:master Jun 10, 2020
@cfc4n cfc4n deleted the watchresponse_chan branch June 13, 2020 06:19
gyuho added a commit that referenced this pull request Jun 26, 2020
…upstream-release-3.3

Automated cherry pick of #11987
gyuho added a commit that referenced this pull request Jul 6, 2020
…upstream-release-3.4

Automated cherry pick of #11987
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

mvcc : WatchResponse chan of watchStream use a lot of memory space
3 participants