redhat-performance / quads

:calendar: The infrastructure deployment time machine
https://quads.dev
GNU General Public License v3.0
87 stars 36 forks source link

Improve find-available.py by using multiprocessing library #49

Closed sadsfae closed 6 years ago

sadsfae commented 7 years ago

Currently bin/find-available.py does some heavy lifting of combinatorial math to parse all machine schedules and return the first available start/end dates and machines that are available based on the # of days and # of machines and optionally the type of machines required.

It can sometimes take upwards of 15-20minutes to run. This is an RFE to investigate and implement the Python processed-based threading interface to hopefully dramatically reduce the run times.

jkilpatr commented 7 years ago

I've been meaning to take a look at this. It sounds like a fun problem.

On Mar 24, 2017 9:51 AM, "Will Foster" notifications@github.com wrote:

Currently bin/find-available.py does some heavy lifting of combinatorial math to parse all machine schedules and return the first available start/end dates and machines that are available based on the # of days and

of machines and optionally the type of machines required.

It can sometimes take upwards of 15-20minutes to run. This is an RFE to investigate and implement the Python processed-based threading interface https://docs.python.org/2/library/multiprocessing.html to hopefully dramatically increase the run times.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/redhat-performance/quads/issues/49, or mute the thread https://github.com/notifications/unsubscribe-auth/ASxq2c57Vc1gI2WFAbAnvdqj-WyGccqxks5ro8pkgaJpZM4MoR_H .

geekodour commented 6 years ago

Hello, I am willing to work on this issue. But I am having issues running this on my machine, how can I setup quads on my local machine? @sadsfae @arcolife ?

sadsfae commented 6 years ago

Hi @geekodour we'd love for more people to help us improve QUADs. What part of the setup are you having issues with?

You can install it on a test machine or VM for example via: https://github.com/redhat-performance/quads#installing-quads-from-rpm

You can quickly setup a fully-functional QUADS sandbox with this script here: https://github.com/redhat-performance/quads/blob/master/testing/quads-sandbox.sh

Our getting started docs are here: https://github.com/redhat-performance/quads#contributing

If you have problems with any of the above just let us know or ping wfoster or kambiz on #quads via irc.freenode.net and we'd be happy to assist.

geekodour commented 6 years ago

Thankyou @sadsfae ! I am able to run quads nicely now. I am working on this issue now, There another issue with /bin/find-available.py , when there are no schedule is set the scripts loops endlessly. will put a check on that, will send a PR for that soon.

sadsfae commented 6 years ago

Hey @geekodour that's great news. I have created an issue for you to work on this here:

https://github.com/redhat-performance/quads/issues/168

One note: we don't do pull requests, we instead use Gerrit / Jenkins CI workflow. Take a look here to see how we accept patches and merging:

https://github.com/redhat-performance/quads#contributing

Once you submit a patchset it will run through our CI system and will show up here for review:

https://review.gerrithub.io/#/q/project:redhat-performance/quads

Typically Gerrit is better at code review and conversation once we've filed the issue on Github and you get used to it.

sadsfae commented 6 years ago

A merged improvement for this has been submitted here:

https://github.com/redhat-performance/quads/commit/250efc537b65da9c4c934726ca7f8e425fd071c6