Skip to content

Configurable CPU usage #358

@arisu3

Description

@arisu3

The GROMACS cores already support this feature by passing the -cpu flag to it with an integer that is interpreted as a percentage of allowable CPU time (for example, -cpu 50 will limit CPU usage to 50% across all folding threads). The v8 client does not currently support this, but implementation would be trivial as the heavy work has already been done by the core.

The current situation, where usage is determined entirely by thread count, leads to a number of problematic situations:

  • Selecting fewer threads causes each core to boost higher, producing more heat. Depending on the hardware, this inversion in expected behavior can occur at a thread count as high as four. A user's attempt to decrease noise can paradoxically increase it.
  • Power usage increases at a rate proportional to clock frequency cubed even in the best of conditions. On the same system, four cores running at 4 GHz will use far more power than eight cores running at 2 GHz, despite getting roughly the same PPD.
  • Changing thread count is a coarse-grained way to adjust power usage, effectively preventing users with a low core count from adjusting CPU usage without running into minimum thread count limits or bringing cores into single-core boost.
  • Projects optimized for a certain number of threads may find themselves suddenly running greater than or fewer than what they were meant for, increasing the domain decomposition overhead and increasing the risk of failures.

Ultimately, it would probably be best for the thread count selection to be moved to the advanced configuration section for users who have very high core count systems or who have particular niche use cases, such as running two folding projects on separate NUMA nodes.

For the average user, CPU usage as a percentage of total CPU time better approximates the user's mental model of what the UI is allowing them to do. For now, I believe it would be best to start by adding support for CPU usage to be configured via the WS API and config file.

I am happy to write a PR myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions