Skip to content

Expose information about system-internal parallelism to the scheduler #19740

Open
@alice-i-cecile

Description

@alice-i-cecile

What problem does this solve or what need does it fill?

Whether or not a system uses parallelism, such as via Query::par_iter, is extremely important information for optimizing performance.

Multiple heavily parallel systems should not be run beside each other at the same time.

Possible solutions

  1. Manually mark a system as parallel via system config, as a type of performance hint for schedulers.
  2. Require a special ParQuery system param to access Query::par_iter
  3. Have a virtual unit type resource ParallelAccess, and require the user pass in &mut ParallelAccess into Query::par_iter to get it to compile.

I think that 3 is simply a better form of 2. We may want scheduler performance hints in some form anyways though, even if we don't end up using it for parallelism.

Additional context

Prompted by @ItsDoot: https://discord.com/channels/691052431525675048/749335865876021248/1385332129269022790

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleC-PerformanceA change motivated by improving speed, memory usage or compile timesS-Needs-Design-DocThis issue or PR is particularly complex, and needs an approved design doc before it can be mergedX-ControversialThere is active debate or serious implications around merging this PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions