Skip to content

feat(npi): configure 48-thread default for RAPID buckets and add explicit numjobs override - #191

Merged
kislaykishore merged 1 commit into
mainfrom
feat-npi-rapid-numjobs
Aug 31, 2026
Merged

feat(npi): configure 48-thread default for RAPID buckets and add explicit numjobs override#191
kislaykishore merged 1 commit into
mainfrom
feat-npi-rapid-numjobs

Conversation

@kislaykishore

Copy link
Copy Markdown
Collaborator

Summary

  • Sets NUMJOBS=48 concurrency for Zonal RAPID buckets across GCE (npi.py) and GKE (npi_gke.py) benchmark runners, while preserving NUMJOBS=112 default for standard Regional buckets.
  • Introduces --numjobs CLI argument in npi.py and npi_gke.py to allow custom job concurrency overrides.
  • Updates FIO benchmark runner (fio_benchmark_runner.py) to dynamically resolve num_jobs from environment variables (NUM_JOBS, NUMJOBS) when pre-creating benchmark directories.
  • Adds comprehensive unit tests in npi_test.py and npi_gke_test.py covering standard, RAPID, smoke mode, and explicit --numjobs overrides.

Testing

  • Ran unit test suite (python3 -m unittest discover -p "*_test.py") — all 123 tests passed.

…icit numjobs override

- Set default NUMJOBS=48 concurrency for Zonal RAPID buckets across GCE and GKE benchmark runners while preserving NUMJOBS=112 default for standard regional buckets.
- Add --numjobs CLI argument in npi.py and npi_gke.py to allow custom job concurrency overrides.
- Update FIO benchmark runner to dynamically resolve num_jobs from environment variables (NUM_JOBS, NUMJOBS) when pre-creating benchmark directories.
- Add unit tests verifying NUMJOBS environment variable propagation and overrides for GCE and GKE benchmark spec generation.
@kislaykishore
kislaykishore merged commit ee3bd10 into main Aug 31, 2026
8 checks passed
@kislaykishore
kislaykishore deleted the feat-npi-rapid-numjobs branch August 31, 2026 08:20

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for configuring and overriding the 'numjobs' concurrency count in benchmark runs across both local Docker and GKE environments, including a default of 48 for RAPID buckets. It also adds corresponding CLI arguments and unit tests. The feedback suggests simplifying the redundant argument-parsing logic in GKE job spec creation to improve readability.

Comment thread npi/npi_gke.py
Comment on lines +57 to +68
if "--numjobs=2" in args:
num_jobs_val = "2"
elif any(arg.startswith("--numjobs=") for arg in args):
num_jobs_val = "112"
for arg in args:
if arg.startswith("--numjobs="):
num_jobs_val = arg.split("=", 1)[1]
break
elif is_rapid_bucket:
num_jobs_val = "48"
else:
num_jobs_val = "112"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The logic for resolving num_jobs_val from args contains redundant checks. Specifically, checking "--numjobs=2" in args is redundant because the subsequent startswith("--numjobs=") loop will already correctly match and extract "2". Additionally, checking any(arg.startswith("--numjobs=") for arg in args) before looping is also redundant as the loop itself can handle the search. We can simplify this block to improve readability and maintainability.

    num_jobs_val = None
    for arg in args:
        if arg.startswith("--numjobs="):
            num_jobs_val = arg.split("=", 1)[1]
            break
    if num_jobs_val is None:
        num_jobs_val = "48" if is_rapid_bucket else "112"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant