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

Multiple collectors #204

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Multiple collectors #204

wants to merge 4 commits into from

Conversation

exodist
Copy link
Member

@exodist exodist commented Nov 10, 2020

I need to clean this up a bit, but would love early review.

@toddr and @atoomic This is based off the updated PR for too many open handles. I was hoping you could pull this down and give it a try, maybe set --max-open-jobs to a lowish number like 100, and then also add --spawn-worker-at-max to see if that solves your problem without the collector(s) getting horribly backed-up. If you are in a situation where the collector is THAT backed up then your tests may finish well before yath does which would cost you extra time, assuming your max open handles limit is per-process and not per-user extra collectors can help work though the backlog.

This method does not limit the number of collectors, rather whenever a collector hits the max open files it forks, the fork finishes up all the jobs already started leaving the main collector to grab new jobs, once all the jobs of the forked collector finishes it exits, if another backup happens a new one forks. If you have multiple backups you get multiple collectors. So for example setting -j100, and setting --max-open-jobs to 1 would mean 100 collectors get spawned (yikes! do not do that!) it could actually climb higher than 100 if the collectors take too long even on a single job. So you really do want a decently high --max-open-jobs.

Like all things, you need to balance the 3 collector settings and tune them to something that works right for your setup, which is why I wanted all these to be configurable.

toddr and others added 4 commits November 9, 2020 18:50
…ne time.

Most unix systems limit the number of file handles any one process can
have open at a time to 1024. When the collector gets behind, it may try
to open too many files for completed jobs at once. Limit this with a
new collector setting which defaults to 300. They'll be picked up once
the ones polled are processed.

This commit adds App::Yath::Options::Collector
 * Added another collector option
 * Renamed collector option
 * Put option in test and start commands
 * Make warning when job limit is hit a proper event
 * Only issue the warning once per test run
 * Use the correct settings file in collector
Primarily a typo, but also a race condition that could have collector
exit with jobs still waiting to send events.
I am too tired right now after finally getting this working. It needs
review, and I will probably want to clean it up myself after some sleep.
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.

2 participants