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

Reduce DB I/O during optimization #823

Merged
merged 4 commits into from
Mar 7, 2022

Conversation

bouthilx
Copy link
Member

@bouthilx bouthilx commented Mar 7, 2022

Runner was calling the DB at every loop, through experiment.is_done.
This was causing huge I/O, up to 2MB/s for a single Runner. These calls
were not necessary since we could look at self.free_worker first to
determine if it was necessary to sample new trials. This PR reduces the
I/O level about 78 times less for working history of ~500 trials and
trial executions of ~30mins. There is still a lot of room for
improvement for the efficiency of is_done calls and algorithm locking
mechanism.

A new test is added to ensure that further changes do not increase the
I/O levels significantly above current nominal levels (~17KB/s in and
~59KB/s out for the test case).

Runner was calling the DB at every loop, through `experiment.is_done`.
This was causing huge I/O, up to 2MB/s for a single Runner. These calls
were not necessary since we could look at `self.free_worker` first to
determine if it was necessary to sample new trials. This PR reduces the
I/O level about 78 times less for working history of ~500 trials and
trial executions of ~30mins. There is still a lot of room for
improvement for the efficiency of `is_done` calls and algorithm locking
mechanism.

A new test is added to ensure that further changes do not increase the
I/O levels significantly above current nominal levels (~17KB/s in and
~59KB/s out for the test case).
@bouthilx bouthilx added bug Indicates an unexpected problem or unintended behavior critical The bug causes data loss, crashes or hangs processes, makes the application unusable labels Mar 7, 2022
@bouthilx bouthilx added this to the v0.2.3 milestone Mar 7, 2022
@bouthilx bouthilx requested a review from Delaunay March 7, 2022 02:54
@bouthilx bouthilx merged commit 7905dd5 into Epistimio:develop Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior critical The bug causes data loss, crashes or hangs processes, makes the application unusable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants