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

Large batch of notifications gets sent to subscriber in small parts rather than all at once #393

Open
jleveque opened this issue Oct 12, 2020 · 3 comments
Labels

Comments

@jleveque
Copy link
Contributor

jleveque commented Oct 12, 2020

When an application has subscribed for notifications and a large batch of notifications should theoretically be available, it appears as though the notifications "trickle in" to the application from the underlying Redis connection (~10 per second), rather than being received in a single, large batch.

This behavior was noticed while debugging an issue with caclmgd here: sonic-net/sonic-buildimage#5275

@qiluo-msft
Copy link
Contributor

I assume you are talking about caclmgrd.
Could you try improve below code?
https://github.com/Azure/sonic-buildimage/blob/bba5df05233e17ab3eb8cd378e4629923b30ff16/files/image_config/caclmgrd/caclmgrd#L553

After each select, there are lots of data in SubscribeStateTable. You can keep pop() until you get empty result.

@jleveque
Copy link
Contributor Author

@qiluo-msft: @abdosi converted caclmgrd to use swsscommon. Could you also please provide an example of another application which "keeps pop() until you get empty result"?

@jleveque
Copy link
Contributor Author

jleveque commented Oct 14, 2020

@abdosi: Have you confirmed that this is not actually an issue with swss-common, but rather with the way you were using it? If so, I will close this issue.

@jleveque as i mentioned here sonic-net/sonic-buildimage#5621 with the pop until empty we are preventing update to iptable for x rules by x times.

In my experiment for the configuration where we just dump x rules all x notification are present in select object queue withy no delay and we are processing them continuously.

I feel my experiment proves there is no delay in swsscommon . Do you want any particular test to run ?

I am also planning to let Mellanox QA person to test with this change and let us know.

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

No branches or pull requests

2 participants