Skip to content

CI: Use all available cores in the CI #24028

Closed
@datapythonista

Description

@datapythonista

If I'm not wrong, both Travis and Azure provide two cores for the execution of jobs (I think in both cases the number does not necessarily need to be 2, and could be higher, or I guess lower, depending on their load).

So far we are just parallelizing the execution of tests, where we are using 2 processes in most cases (except for the tests marked as single).

We should be able to speed up the CI by detecting the number of cpus available for the job, and parallelize at least (assuming 2 cpus):

  • Building pandas (adding -j2 to python setup.py build_ext --inplace)
  • Building the docs (adding --num-jobs=2 to ./doc/make.py html)
  • Running the tests, with the detected cpus, and where it's not already using multiple processes
  • Not sure if there is anything else that can be run in more than one core (conda, linting, benchmarks...)

Travis specs: https://docs.travis-ci.com/user/reference/overview/#virtualisation-environment-vs-operating-system

UPDATE:

  • Based on tests in my local machine, doesn't seem like the -j argument in setup.py build_ext has any effect. I'd say it's ignored, and the process is always single core.

Time to run the tests not slow and not network in the CI:

1st run:

-j 0 -j auto
azure 1443 sec 804 sec
travis 1362 sec 959 sec

2nd run:

-j 0 -j auto
azure 1461 sec 839 sec
travis 1421 sec 1009 sec

Metadata

Metadata

Assignees

No one assigned

    Labels

    CIContinuous Integration

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions