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 performance issue, round robined (persistent) queues should not wait #388

Closed

Conversation

bendavies
Copy link
Contributor

This fixes a performance issue where by persistent queues, with drivers that respect $duration on popMessage.

This issue is that, during a round robin, an empty persistent queue will wait for 5 seconds before allowing the next queue to dequeue. The problem is obviously compounded the more queues in the round robin.

@henrikbjorn
Copy link
Contributor

This changes the logic when using the round robin, instead the sleep should be equal to the $duration

@bendavies
Copy link
Contributor Author

bendavies commented Aug 14, 2018

hi @henrikbjorn

I'm not really sure what you mean. RoundRobin does not have any $duration.
The sleep is to prevent 100% CPU usage when iterating the queues.

The main issue is rather more involved here.

  1. Add $duration parameter to PersistentQueue.dequeue() #326 should not have been merged,$duration should have been added at the interface level.
  2. Not all the drivers implement $duration in popMessage.

These needs fixing really but would be a large job.

This PR is the quickest way to fix the round robin queue, which is currently pretty useless when used with multiple persistent queues.

@acrobat
Copy link
Member

acrobat commented Aug 14, 2018

Related to #321

@bendavies bendavies force-pushed the fix-round-robin-performance branch from 3cbeb4d to 40ff41d Compare April 1, 2019 16:20
@bendavies bendavies closed this Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants