Schedule fuzz tasks based on target CPU capacity for Chrome - #5462
Draft
hunsche wants to merge 1 commit into
Draft
Schedule fuzz tasks based on target CPU capacity for Chrome#5462hunsche wants to merge 1 commit into
hunsche wants to merge 1 commit into
Conversation
Introduces the CHROME_FUZZ_TARGET_CPUS feature flag to allow dynamically controlling the target number of active CPUs for Chrome fuzzing workloads. When enabled, schedule_fuzz aggregates active GCP Batch workloads and in-flight pipeline queues (preprocess + utask_main) to determine remaining CPU capacity, preventing downstream queue buildup and tworker failures.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request introduces CPU-aware scheduling for Chrome fuzzing tasks in
schedule_fuzz.py, allowing operators to set a target CPU utilization ceiling rather than relying solely on static Pub/Sub buffer sizes.Background & Problem
Previously,
schedule_chrome_fuzz_tasksscheduled fuzz tasks into thepreprocessqueue purely based onPREPROCESS_QUEUE_SIZE_LIMITwithout visibility into downstream consumption or actual running compute. Becausetworkerpreprocessing takes only seconds while downstream fuzzing runs take minutes to hours, thepreprocessqueue would drain quickly, causingschedule_fuzzto inject thousands of additional tasks every cron cycle. This led to queue buildups inutask_mainandQueueLimitReachedErrorfailures intworker.Changes
CHROME_FUZZ_TARGET_CPUStoFeatureFlagsto dynamically configure the target number of active vCPUs for Chrome fuzzing.CHROME_FUZZ_TARGET_CPUSis enabled,schedule_fuzzdetermines remaining capacity by comparing the target against total committed CPUs:Committed CPUs = (Active Batch Jobs + Preprocess Tasks + Utask Main Tasks) * 2 vCPUsjobs:countByStateGCP Batch endpoint across configured regions, memoized with 60-second caching.ChromeCpuCapacityTestcovering deficit scheduling, capacity saturation, and fallback paths.