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

prefetch option only available for mapper, not for agent #11

Closed
kingcu opened this issue Nov 12, 2009 · 4 comments
Closed

prefetch option only available for mapper, not for agent #11

kingcu opened this issue Nov 12, 2009 · 4 comments

Comments

@kingcu
Copy link

kingcu commented Nov 12, 2009

The prefetch option that is a savior when you have high volumes of intense tasks is only available on mappers. The mapper doesn't really benefit from having a prefetch limit, as the mapper receives mostly pings and registrations, which can be processed really fast. It is the agent that is going to predominantly be affected, and should also have the option.

I went ahead and forked nanite, made the changes and am using it in production. This finally fixed my issue with overloading my agents to the point they were unresponsive and had to be killed. The fork is available on my github page if you are interested in bringing the change upstream.

In the fork, I simply added a configuration option for the agent, including adding the command line options for the nanite-agent script. I also documented the new config option in the init method, so aside from some review, it should be ready to go.

@roidrage
Copy link
Collaborator

Cool, I'll merge it later today.

Any reason why you're checking if the prefetch method is there on the AMQP connection?

@kingcu
Copy link
Author

kingcu commented Nov 12, 2009

that was actually brought over from the mapper.rb method. I left it as I am assuming some versions of the AMQP gem don't have that method?

@roidrage
Copy link
Collaborator

Ah, gotcha, no worries, I'll look into it.

@roidrage
Copy link
Collaborator

Merged, thanks!

This issue was closed.
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

No branches or pull requests

2 participants