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

expedite parallel tests #1462

Merged
merged 2 commits into from Mar 3, 2012
Merged

expedite parallel tests #1462

merged 2 commits into from Mar 3, 2012

Conversation

minrk
Copy link
Member

@minrk minrk commented Mar 1, 2012

Two changes, which significantly reduce the time it takes to run iptest IPython.parallel:

  • changed the heartbeat from the default 3s to 1/4s
  • changed the add_engines code, so that in most cases engines up to a minimum number are added, rather than always adding to the total. This means that most previous calls to add engines are now no-ops, because there were already enough for the given situation.

On my machine, this reduced time iptest IPython.parallel from two minutes to forty seconds.

No need for conservative heartbeat period when running local tests, which
directly affects the time it takes to register or remove an engine.
Fewer engines are added during the test suite, by counting the absolute number of engines, rather than repeatedly adding a minimum number.
@takluyver
Copy link
Member

Will changing the heartbeat affect ShiningPanda? I remember we've occassionally seen failures where processes didn't start up as fast as it expected.

@minrk
Copy link
Member Author

minrk commented Mar 1, 2012

It shouldn't, or at least not negatively. There are two levels of timeout related to registration and the heartbeat:

  1. in the Hub, the timeout is the longer out of: two heartbeat periods or five seconds. This measures the time between the initial registration_request message, and the first beat of the engine's heart. If this timeout is reached, the engine is considered DOA, and can never register. I am not aware if this timeout ever having been reached by an engine that hasn't died.
  2. in the test suite itself, there is a timeout of five (or ten?) seconds for engines to be added to the list before the test assumes there was a problem with registration. This timeout includes the time between requesting the ipengine subprocess to start, and its sending of the first message, which is why it sometimes fails on slow machines/VMs. Since the time to successfully register is proportional to the heartbeat period, this change should actually make the ShiningPanda timeout less likely.

minrk added a commit that referenced this pull request Mar 3, 2012
expedite parallel tests

* changed the heartbeat from the default 3s to 1/4s

* add_engine only adds more engines if needed
@minrk minrk merged commit c5059ac into ipython:master Mar 3, 2012
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
expedite parallel tests

* changed the heartbeat from the default 3s to 1/4s

* add_engine only adds more engines if needed
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

2 participants