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

#323 RabbitMQ transport is sending events too slow #324

Merged
merged 7 commits into from
Jul 27, 2015

Conversation

tomkregenbild
Copy link

This fix includes two part:

  1. I added a log print in debug mode that shows the size of the Queue and a count of the number of transports that were performed in order to be able to find if the problem with delivery rates is in adding events to the queue or sending them with the defined transport.
  2. I added a new configuration variable that allows to run more than one consumer process per Queue in order to increase the performance of the transport.

Please let me know if you have any questions or remarks - from the tests I ran in my environment using the rabbitMQ trasport (sends around 6500 log entries per second), increasing the number of consumers really helped.

Tom Kregenbild added 2 commits July 7, 2015 16:21
…er transports in debug mode in order to find problem in transport rate.
…onsumers by creating additional processes.
@@ -53,7 +53,8 @@ def __init__(self, beaver_config, queue_consumer_function, callback, logger=None
self._folder = self._beaver_config.get('path')
self._last_file_mapping_update = {}
self._logger = logger
self._proc = None
self._number_of_consumer_processes = int(self._beaver_config.get('number_of_consumer_processes'))
Copy link
Member

Choose a reason for hiding this comment

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

All this logic should also be set in the tail_manager and tail module.

Copy link
Author

Choose a reason for hiding this comment

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

@josegonzalez
Thanks, missed it.
I added it to worker/tail_manager.py but I don't see anything related in worker/tail.py. Can you focus on where should I add the change in worker/tail.py?

…onsumers by creating additional processes while running with --experimental flag
@tomkregenbild
Copy link
Author

@josegonzalez I verified that the changes in the last commit are working well on my machine also with the --experimental flag but I see that the "Travis CI Build" is failing with "No output has been received in the last 10 minutes" - Is there a problem in the code or it is a problem with the test?

Tom Kregenbild added 4 commits July 22, 2015 11:07
…nnection instead of BlockingConnection for better performance.
1. Add clear debug prints with queue size (one print every 1000 items in order not to hurt performance)
2. If main queue is empty keep running and do nothing
3. In case of a timeout from main queue restart queue
josegonzalez added a commit that referenced this pull request Jul 27, 2015
#323 RabbitMQ transport is sending events too slow
@josegonzalez josegonzalez merged commit 6a1bb22 into python-beaver:master Jul 27, 2015
@JamieCressey
Copy link
Member

Fixes #265

@JamieCressey
Copy link
Member

Fixes #264

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.

None yet

3 participants