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 problem about pod informer #1079

Closed
hykych opened this issue Sep 11, 2019 · 7 comments
Closed

Performance problem about pod informer #1079

hykych opened this issue Sep 11, 2019 · 7 comments

Comments

@hykych
Copy link

hykych commented Sep 11, 2019

	// Create pod informer.
	podInformer := kubeInformerFactory.Core().V1().Pods()

	// Set up an event handler for when pod resources change
	podInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
		AddFunc:    jc.AddPod,
		UpdateFunc: jc.UpdatePod,
		DeleteFunc: jc.DeletePod,
	})

I've seen this informer in the code. Doest it have performance problem since it doesn't filter any kind of pod, when the replicas of tf-operator become larger the api-server will send the same event to each one of tf-operator which brings a lot of pressure to api-server and etcd.

@issue-label-bot
Copy link

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

@gaocegege
Copy link
Member

gaocegege commented Sep 11, 2019

Thanks for your issue. If you mean FilteringResourceEventHandler, it applies the provided filter to all events coming in. Thus it does not help us solve the performance issue. many controllers in Kubernetes, such as job_controller, also use ResourceEventHandlerFuncs.

And we have filter logic in jc.AddPod, thus the operator will avoid redundant reconcile.

Welcome any suggestion and help on it.

@hykych
Copy link
Author

hykych commented Sep 11, 2019

@gaocegege so do you guys have any plan or ideas to solve this? or have you benchmarked to show how severe the problem is?

@gaocegege
Copy link
Member

Benchmark is here #829

@gaocegege
Copy link
Member

@hykych Can you give me more info about your cluster? I think tf-operator will not be the bottleneck.

@jtfogarty
Copy link

/area engprod
/priority p2

@stale
Copy link

stale bot commented Apr 20, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

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

No branches or pull requests

4 participants