Skip to content

Commit

Permalink
Multi-threaded namespace informer
Browse files Browse the repository at this point in the history
We have up to 10 goroutines handling pod events, however handling pod
events depends on namespace existing, and the namespace handler is
single threaded. During a scale test where we create many namespaces
with a few pods in them, the pod handler can get bogged down waiting on
namespace handler to serially get each new namespace. It shouldn't
introduce significant performance cost to handle these also in parallel.

Signed-off-by: Tim Rozet <trozet@redhat.com>
  • Loading branch information
trozet authored and girishmg committed Jul 14, 2021
1 parent c936002 commit 60fde39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion go-controller/pkg/factory/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ func NewMasterWatchFactory(ovnClientset *util.OVNClientset) (*WatchFactory, erro
if err != nil {
return nil, err
}
wf.informers[namespaceType], err = newInformer(namespaceType, wf.iFactory.Core().V1().Namespaces().Informer())
wf.informers[namespaceType], err = newQueuedInformer(namespaceType, wf.iFactory.Core().V1().Namespaces().Informer(),
wf.stopChan)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 60fde39

Please sign in to comment.