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

[fix][loadbalance] Fix wrong unit of NIC speed on linux #15304

Merged

Conversation

gaozhangmin
Copy link
Contributor

@gaozhangmin gaozhangmin commented Apr 25, 2022

Fixes #15229

Motivation

conversion of NIC bandwidth and tx_bytes rx_bytes is wrong on linux platform.

Modifications

  1. For NIC bandwidth:
    1,000 bit/s = 1 kbit/s (one thousand bits per second)

  2. For tx_bytes and rx_bytes, the unit should same with NICLimit , so it should be bytes*8/1000=kbit rather than 8/1024.

Documentation

Check the box below or label this PR directly.

Need to update docs?

  • doc-required
    (Your PR needs to update docs and you will update later)

  • no-need-doc
    (Please explain why)

  • doc
    (Your PR contains doc changes)

  • doc-added
    (Docs have been already added)

  • doc-not-needed

@github-actions
Copy link

@gaozhangmin:Thanks for your contribution. For this PR, do we need to update docs?
(The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

@gaozhangmin gaozhangmin requested review from eolivelli and michaeljmarshall and removed request for eolivelli April 25, 2022 06:13
@gaozhangmin gaozhangmin added this to the 2.11.0 milestone Apr 25, 2022
@github-actions
Copy link

@gaozhangmin:Thanks for providing doc info!

@github-actions github-actions bot added doc-not-needed Your PR changes do not impact docs and removed doc-label-missing labels Apr 25, 2022
@gaozhangmin gaozhangmin force-pushed the fix-WrongNicSpeedConversionOnLinux branch from 874822d to 499c560 Compare April 25, 2022 13:05
@gaozhangmin gaozhangmin requested a review from Jason918 April 25, 2022 13:24
@gaozhangmin
Copy link
Contributor Author

@mattisonchao PTAL

Copy link
Member

@michaeljmarshall michaeljmarshall left a comment

Choose a reason for hiding this comment

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

LGTM. I left a comment that is unrelated to this PR's changes.

Copy link
Member

@mattisonchao mattisonchao left a comment

Choose a reason for hiding this comment

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

LGTM, would you mind to push new PR to fix another branch? branch-2.8, branch-2.9, branch-2.10?

Copy link
Contributor

@Jason918 Jason918 left a comment

Choose a reason for hiding this comment

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

LGTM

@Jason918
Copy link
Contributor

Not in the scope of this PR, but related, see #15322

@Jason918 Jason918 merged commit 840723b into apache:master Apr 27, 2022
@gaozhangmin gaozhangmin deleted the fix-WrongNicSpeedConversionOnLinux branch April 27, 2022 06:27
@mattisonchao
Copy link
Member

Hi, @gaozhangmin

This PR looks could not cherry-pick to branch-2.9, could you mind pushing the new PR to branch-2.9?

@codelipenghui
Copy link
Contributor

codelipenghui commented Jun 7, 2022

Hi, @gaozhangmin

This PR looks could not cherry-pick to branch-2.10, could you mind pushing the new PR to branch-2.10?

@BewareMyPower
Copy link
Contributor

@gaozhangmin Could you migrate this PR to branch-2.8?

@BewareMyPower
Copy link
Contributor

I will cherry-pick #15770 instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker cherry-picked/branch-2.9 Archived: 2.9 is end of life cherry-picked/branch-2.10 doc-not-needed Your PR changes do not impact docs release/2.9.3 release/2.10.2 type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong nic speed unit conversion on linux
9 participants