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

(GH-226) Respond quickly to VMs being consumed #236

Merged

Conversation

glennsarti
Copy link
Contributor

@glennsarti glennsarti commented Sep 1, 2017

Previously in commit 9b0e55f the looping period was changed from a static
number to a dynamic one depending on load, however this meant that the operation
to refill a pool was slowed down somewhat. While not a problem under normal
loads, when a pool was quickly consumed, the pool manager may not respond
quickly enough to refill the pool. This commit:

  • Changes the sleep method, to us a helper sleep method that will wakeup
    periodically and evaluate other wakeup events. This could be used later to
    exit sleep loops when pooler is shutting down to stop blocking threads
  • By default the wakeup_period is set to the minimum pool check loop time, thus
    emulating the behaviour prior to commit 9b0e55f
  • Adds tests for the behaviour

Previously in commit 9b0e55f the looping period was changed from a static
number to a dynamic one depending on load, however this meant that the operation
to refill a pool was slowed down somewhat.  While not a problem under normal
loads, when a pool was quickly consumed, the pool manager may not respond
quickly enough to refill the pool.  This commit:

- Changes the sleep method, to us a helper sleep method that will wakeup
  periodically and evaluate other wakeup events.  This could be used later to
  exist sleep loops when pooler is shutting down to stop blocking threads
- By default the wakeup_period is set to the minimum pool check loop time, thus
  emulating the behaviour prior to commit 9b0e55f
- Adds tests for the behaviour
@glennsarti glennsarti force-pushed the make-check-pool-more-responsive branch from 359b6b5 to f209c2b Compare September 6, 2017 04:46
@glennsarti glennsarti changed the title {WIP} (GH-266) Respond quickly to VMs being consumed (GH-226) Respond quickly to VMs being consumed Sep 6, 2017
@glennsarti glennsarti requested a review from mattkirby September 6, 2017 04:47
@shrug
Copy link

shrug commented Sep 12, 2017

@mattkirby ping, when you get a sec

Copy link
Contributor

@mattkirby mattkirby left a comment

Choose a reason for hiding this comment

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

+1

Looks reasonable to me.

@glennsarti do you know why the tests are failing?

@shrug
Copy link

shrug commented Sep 19, 2017

Gem::InstallError: redis requires Ruby version >= 2.2.2.

Do we need to pin the version of the redis gem?

@glennsarti
Copy link
Contributor Author

Doh...looks like we do :-(

I'll add this to the this PR

Nokogiri and Redis gems have had recent releases which are not compatible with
older ruby versions.  This commit modifies the Gemfile to get the latest of
each of these gems on modern ruby versions and pin to the older gem versions for
older ruby engines.
@glennsarti glennsarti force-pushed the make-check-pool-more-responsive branch from 70aa90b to 0840e11 Compare September 19, 2017 23:43
@glennsarti
Copy link
Contributor Author

@shrug Done. Nokogiri needed some work too.

@mattkirby mattkirby merged commit be61501 into puppetlabs:master Sep 26, 2017
@glennsarti
Copy link
Contributor Author

Thanks @mattkirby

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