Skip to content

Support a core requirement per run that is different than the core limit #858

Open
@PhilippWendler

Description

@PhilippWendler

BenchExec currently supports a core limit per run. Our benchmark definition also allows to specify a core requirement per run, but this is currently undocumented, ignored by BenchExec itself, and only honored by some systems that are used in combination with BenchExec.

The semantics of such a core requirement are: If the core requirement r is higher than the core limit l, then r cores are reserved per run, although the run is allowed to use only l cores. The remaining r-l cores stay unused. If the core requirement r is lower than the core limit l, than each run gets at least r cores and at most l cores depending on how many cores exist (and each parallel run gets the same amount of cores).

In particular, for the first case (r > l) there are some use cases where a less than 100% tight packing of runs onto cores is desired:

  • In order to reduce influences between runs due to shared memory bandwidth, L3 cache etc. one could want to run less than the possible number of runs per CPU.
  • Benchmarking how a tool scales with different number of cores: If one wants to benchmark a tool with for example a core limit of 1, 2, 4, etc. while keeping the same number of parallel runs in each of these benchmarking instances.

A special case of this is to avoid use of hyper threading, i.e., to keep all but one virtual core per physical core unused, in order to get higher performance. This case was requested in #122 and implemented with --no-hyperthreading.

Currently it is in principle possible for a user to achieve this with --allowedCores, but this would need a manual computation of which cores to exclude and this computation depends on non-obvious details of the hardware architecture.

Metadata

Metadata

Assignees

Labels

resource allocationrelated to allocation of resources like CPU cores and memory

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions