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

[performance] in large-scale clusters, init node router policy too slow #4895

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

cmdy
Copy link
Contributor

@cmdy cmdy commented Jan 2, 2025

Pull Request

What type of this PR

Examples of user facing changes:

  • Features
  • Bug fixes
  • Docs
  • Tests

Which issue(s) this PR fixes

Fixes #4849

PR #4884 merge into master branch

@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. performance Anything that can make Kube-OVN faster labels Jan 2, 2025
@coveralls
Copy link

coveralls commented Jan 2, 2025

Pull Request Test Coverage Report for Build 12594003126

Details

  • 229 of 445 (51.46%) changed or added relevant lines in 6 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.3%) to 22.39%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/ovs/ovn-nb-address_set.go 24 32 75.0%
pkg/ovs/ovn-nb-logical_router_route.go 42 59 71.19%
pkg/ovs/ovn-nb-logical_router_policy.go 155 183 84.7%
pkg/controller/init.go 0 63 0.0%
pkg/controller/vpc.go 0 100 0.0%
Files with Coverage Reduction New Missed Lines %
pkg/controller/init.go 1 0.0%
Totals Coverage Status
Change from base Build 12577942218: 0.3%
Covered Lines: 10395
Relevant Lines: 46428

💛 - Coveralls

@cmdy
Copy link
Contributor Author

cmdy commented Jan 3, 2025

@oilbeater PTAL

pkg/controller/vpc.go Outdated Show resolved Hide resolved
@zhangzujian
Copy link
Member

VPC Eregss Gateway e2e test failed. Seems like the LR policy created by egress gateway is deleted. Is there any chance that the LR policy is deleted by the change in this PR?

@cmdy
Copy link
Contributor Author

cmdy commented Jan 3, 2025

VPC Eregss Gateway e2e test failed. Seems like the LR policy created by egress gateway is deleted. Is there any chance that the LR policy is deleted by the change in this PR?

this PR does not delete the LR policy by egress gateway

@@ -63,6 +64,14 @@ func NewOvnNbClient(ovnNbAddr string, ovnNbTimeout, ovsDbConTimeout, ovsDbInacti
return nil, err
}

dbModel.SetIndexes(map[string][]model.ClientIndex{
Copy link
Collaborator

Choose a reason for hiding this comment

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

priority 大部分是一样的是不是不用建索引了,或者比较一下效果

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这里主要用了priority 和 match 做联合索引,但是考虑到如果其中某一个刚好没有值的话,就会变成索引;libovsdb 这个客户端索引,如果不明确指定索引字段的话就会完全查不出来结果;所以这里就除了联合索引外还额外为priority和match 做了单索引配置;另 这里我这边主要对比了where 和 whercache方法的查询效率,在建立索引情况下,表数据量级较大(20w)情况下,单次同条件查询Where 要比WherCache 大概快100~200ms左右,如果需要的话我整理一下具体对比数据

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Anything that can make Kube-OVN faster size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] When kube-ovn-controller restarts, need takes a long time to start process queue tasks
4 participants