Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with the 'CPU time' limit #19

Open
GraphR00t opened this issue Dec 17, 2023 · 0 comments
Open

Issues with the 'CPU time' limit #19

GraphR00t opened this issue Dec 17, 2023 · 0 comments
Labels
major bug Something isn't working

Comments

@GraphR00t
Copy link
Contributor

GraphR00t commented Dec 17, 2023

The CPU time limit limits the amount of CPU time spent by a module and its children.

  • This limit is NOT intended to be very precise.
  • The total work done by an Inox process should not be computed based on CPU time spent by all modules running in the process.

Main Issues

  • When a goroutine (module) pauses its execution its CPU time bucket does not stop decreasing the token count, unless the code section that causes the goroutine switch is wrapped in a Context.DoIO call. Goroutines can also be preempted.
  • Some goroutines do not correspond to a module, therefore the CPU time they spend is not counted.

Preemption

Proposed solutions (should be used in conjunction)

  • Wrap as many code snippets as possible that can cause a goroutine switch in a Context.DoIO call, although this is very limited.
  • Make lthreads periodically report to their CPU-time limiter that they are running, this should be implemented in several places.
    • In the evaluation loop
    • In several points of long-running sections of Go-only code
  • Avoid doing heavy work in independent goroutines.
@GraphR00t GraphR00t added the major bug Something isn't working label Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant