Skip to content

Rework scheduler options and defaults #1251

@sporksmith

Description

@sporksmith

I think things are heading towards always using the "host" scheduler (-t host) with --max-concurrency set to what would previously have been the number of workers; e.g. the number of physical CPU cores available, and the number of workers (-w) set to something in between "number of hosts in the simulations" and "number of hosts in the simulation / ~100". This is all a bit confusing and fiddly for users.

Current proposal:

  • Remove schedulers other than the host scheduler, reclaiming the -t flag
  • Remove the "0 worker" special case that runs hosts on the main shadow thread. Running a single worker isn't much more overhead, and this would get rid of some extra complexity in the code.
  • Rename --max-concurrency to --processors and -p, described as "Number of processors to utilize to execute simulated hosts". We decided against calling this something more specific like --logical-processors, since that's an implementation detail we'd like to be able to change without a major release.
  • Add a flag --hosts-per-thread, and by default set the number of worker threads based on this and the number of hosts in the simulation. On one hand this leaks a bit about the "logical processor" implementation, but OTOH it probably does need to be a tunable parameter. Maybe this should be in the experimental/unstable section, and/or should not have a single-character-alias, so that we can later change it to silently do nothing.
  • Keep --workers but drop -w, and again make it a flag that could in the future may be silently ignored. If set, this would override --processors

Metadata

Metadata

Assignees

Labels

Component: DocumentationIn-repository documentation, under docs/Component: MainComposing the core Shadow executablePriority: MediumImportant but not urgentStatus: AcceptedBug is reproducible or effort is allocatedType: MaintenanceRefactoring, cleanup, documenation, or process improvements

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions