Skip to content

Handle virtual cores more explicitly #271

@JnsLns

Description

@JnsLns

Please write here what feature pandarallel is missing:

There is some inconsistency regarding whether nb_workers refers to pyhsical cores or logical cores.

  • The documentation does not specify explicitly whether pandarallel.initialize(nb_workers=...) is physical or logical cores
  • The default value used if nb_workers is not passed is the number of physical cores (code)
  • It seems however, that the value passed to nb_workers is actually interpreted as logical cores

The main problem is that on a machine with virtual cores, pandarallel will by default use only as many virtual cores as there are physical cores, because it counts the physical cores, but interprets the number as logical cores. This might be solvable by simply changing Falseto True in the line linked above (but maybe there are downstream complications).

The other improvement would be to mention explicitly on the documentation that the value passed to nbworkers is logical cores.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions