Skip to content

Use number of cores as a parameter to scale() #130

Closed

Description

@guillaumeeb

We've recently switched from number of jobs to number of worker processes as an argument to scale method. This is good for working with adaptive cluster as defined in distributed, but somehow not really easy to deal with while using dask-jobqueue, at least for me.

Ideally, we would use unitary job that spawn an entire node of our cluster. But in real life, I often find myself changing cores and process parameters between use cases, or to better fit with the current use of my cluster, when there is other users' job that are not using full nodes for example.

And at the end, when using scale method, what I want is to scale to a given number of CPU cores, no matter the number of jobs or workers or process or threads. So I'm left doing the (simple) maths of translating between number of cores and number of processes given my JobqueueCluster initialization.

It would be really easier if we could have the option to specify a cores kwarg or something like this to scale method.

Activity

  1. mrocklin commented on Aug 16, 2018

    @mrocklin
    Member
  2. jhamman commented on Aug 17, 2018

    @jhamman
    Member

    I like the ideas here. These kwargs would probably fit in the base cluster, yes?

    @guillaumeeb, I'm wondering if you want to play with my branch a bit in #97. I'm having trouble wrapping it up but I think the general improvements there would make using scale and adaptive more friendly.

  3. guillaumeeb commented on Aug 17, 2018

    @guillaumeeb
    MemberAuthor

    I like the ideas here. These kwargs would probably fit in the base cluster, yes?

    Yes I believe so too, @mrocklin do you agree?

  4. mrocklin commented on Aug 17, 2018

    @mrocklin
    Member
  5. mrocklin commented on Aug 17, 2018

    @mrocklin
    Member
  6. guillaumeeb commented on Aug 23, 2018

    @guillaumeeb
    MemberAuthor

    After a dask-jobqueue presentation today with teams doing heavy flight dynamics computation, I believe that this proposal could be an important improvement for easier adoption. They were really enthusiast with the tool, but explaining the scaling parameter was a pain point, even given it's not that hard. Dealing with scheduler jobs not corresponding to number of workers is unclear.

    I see two ways of doing this:

    • Easier would just be to overload scale and adapt, and convert ncores to nworkers here in dask-jobqueue.
    • Better one will be to implement functionnality upstream as @mrocklin and @jhamman suggest. This would probably prove more complicated, especially dealing with Cluster sub classes not implementing methods or attributes, and synchronization between development on both projects. Special thought to the cluster widget, but that can be addressed later on.

    I'm keen to work on either, solution. It would be nice if I could have some advice, and maybe rough insights on how to do it best if we chose the second option.

  7. mrocklin commented on Aug 23, 2018

    @mrocklin
    Member

    I agree that doing the second option would be nicer. I think that this requires us to develop a convention used by the dask deployment subprojects to record cpu and memory per worker in a standard way. I'll raise an issue upstream.

  8. mrocklin commented on Aug 23, 2018

    @mrocklin
    Member

    Raised upstream at dask/distributed#2208

  9. guillaumeeb commented on Oct 2, 2018

    @guillaumeeb
    MemberAuthor

    After discussions in dask/distributed#2209 and dask/distributed#2235, and after some thoughts, but without actually trying anything, I feel that it may be simpler to just copy and paste the code from dask/distributed#2209 to dask-jobqueue. But should I:

    I don't see other solutions, but I don't really like any of those, an external opinion would be welcomed here. Is this really wrong to duplicate distributed.deploy.Cluster here while waiting for dask/distributed#2235 to be solved?

  10. mrocklin commented on Oct 2, 2018

    @mrocklin
    Member
  11. jhamman commented on Oct 2, 2018

    @jhamman
    Member

    I also don't have particularly strong feelings about this. If you remember, I was also heading down the path of overriding the scale method. My hope is that a more elegant solution comes out of dask/distributed#2235. In the short term though, I think going down this path may yield some important learning lessons.

  12. self-assigned this
    on Oct 27, 2018
  13. added
    enhancement
    on Oct 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions