benchmark-suite-execution
Skill10 starsChanged 4 months agoApache-2.0View on GitHub
Guides on configuring targets.json, parameterizing and executing benchmark suites on GCE VMs and GKE clusters using npi_orchestrator.py, managing state resets in ~/.npi/npi_run_state.json, enforcing active safety policies (4h inactivity timeout, 85% disk usage limit, TPU OOM avoidance), and verifying BigQuery table exports for host_info and fio_* tables.
- Reads credentials
In this repository9 other files it gives its agents.
- npi/.agents/AGENTS.mdAGENTS.md
- analysis-report-generationSkill
- benchmark-build-setupSkill
- bucket-creationSkill
- conformance-testingSkill
- gke-e2e-testingSkill
- remediation-advisorSkill
- run-gcsfuse-npiSkill
- ssh-connection-managementSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 80
Verify LRO/GRO offloads and RFS/RPS packet steering are enabled on target host interfaces.
- Very specific: line 81
If host interface tuning has not been applied, refer to Remediation Advisor to tune ethtool and sysctl settings before launching benchmarks.
- Distinctive: line 86
Clean Run / Retrigger: If starting a fresh run or recovering from a failed/corrupted execution state, remove existing state:
- Distinctive: line 101
Run the orchestrator script from the host environment:
- Distinctive: line 110
Inactivity Timeout: If no log output is detected for 4 hours (14,400s), the orchestrator automatically aborts the run to prevent hanging …
- Distinctive: line 111
Disk Space Protection: If storage buffer usage on target VM exceeds 85%, GCE runs are aborted to prevent disk exhaustion.
- Very specific: line 112
GKE TPU Memory Management: Ensure --use-memory-volumes flag is enabled in npi_gke.py to mount buffers in RAM (tmpfs).
- Very specific: line 143
Ensure total_records in BigQuery equals iterations * target_count * test_matrix_rows.
- Very specific: line 145
Check npi_commands.log for zero error exit codes during execution.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Benchmark Suite Execution for GCSFuse NPI
This skill guides you through defining target environments in targets.json, executing benchmarks concurrently on GCE VMs and GKE clusters using npi_orchestrator.py, monitoring execution against safety policies, managing run state files, and verifying BigQuery metric exports.
Prerequisites & Trigger Conditions
Prerequisites
- Benchmark Images Pushed: Container images built and pushed to Artifact Registry (
us-docker.pkg.dev/<PROJECT_ID>/gcsfuse-npi-images:<IMAGE_VERSION>) viabenchmark-build-setup. - Storage Buffers Mounted: RAID0 or
tmpfsRAM disks mounted at configured buffer paths (/mnt/lssdor/tmp/npi_buffer). - Active Master SSH Sockets: Master SSH sockets established for target VMs at
~/.ssh/sockets/<TARGET_NAME>.sockusing-o IdentitiesOnly=yes -i ~/.ssh/google_compute_engine. - CLI Tools & Intermediate Runner VM KUBECONFIG Execution:
gcloud,kubectl, andbqCLI tools configured and authenticated. All GKE cluster credential fetches (gcloud container clusters get-credentials),kubectlinvocations, andnpi_gke.pyexecutions MUST run EXCLUSIVELY on the intermediate runner VM host environment underKUBECONFIG=~/.kube/npi_kubeconfig. Executinggcloudorkubectlinside GKE worker node SSH shells is strictly forbidden. - GKE Cluster CSI Driver & Workload Identity: For GKE cluster targets, Workload Identity (
gcloud container clusters update <CLUSTER> --workload-pool=<PROJECT_ID>.svc.id.goog) and the GCSFuse CSI Driver addon (gcloud container clusters update <CLUSTER> --update-addons GcsFuseCsiDriver=ENABLED) MUST be enabled prior to launching benchmarks. Verify CSI driver registration (kubectl get csidrivers) to prevent pods from stalling inContainerCreating. - Host-Level OS Tuning: Large Receive Offload (LRO/GRO) and Receive Flow Steering (RFS/RPS) enabled on target VM network interfaces to achieve the 20 GB/s SLA gate requirement.
Trigger Conditions
- Target VMs and GKE clusters are provisioned, configured, and ready to execute FIO or Go SDK benchmark workloads.
- Initiating automated benchmarking across GCE and GKE targets for NPI performance qualification.
- Retriggering benchmark suites after state reset or resume operation.
Input/Output Contract
Inputs
targets.json: Configuration file specifying target definitions (GCE VMs, GKE clusters, buckets, dataset prefixes, buffer mount paths, node selectors).- CLI Flags:
--benchmarks(e.g.,read_parallel,write_parallel,all),--image-version,--iterations. - GCS Test Buckets: Regional and zonal (RAPID) target buckets.
Outputs
~/.npi/npi_run_state.json: Local run state tracking file managing workflow resumption or clean restart.npi_commands.log: Detailed command and output log capturing stdout/stderr across test execution steps.- BigQuery Tables: Exported benchmark datasets containing:
<DATASET_PREFIX>_regional.host_infoor<DATASET_PREFIX>_zonal.host_info<DATASET_PREFIX>_regional.fio_<benchmark_name><DATASET_PREFIX>_regional.go_client_read_<config>
Step-by-Step Procedure
Step 1: Configuration & Targets Setup
Collect target details and populate targets.json in the root configuration directory.
Example targets.json:
[
{
"name": "gce-c4-ssd",
"type": "gce",
"vm_name": "<GCE_VM_NAME>",
"zone": "<GCE_ZONE>",
"bucket": "<REGIONAL_BUCKET>",
"dataset": "<BQ_DATASET_PREFIX>",
"buffer_mount": "<SSD_MOUNT_PATH>",
"has_ssd": true,
"is_rapid_bucket": false
},
{
"name": "gke-tpu-slice",
"type": "gke",
"vm_name": "<GKE_INTERMEDIATE_VM_NAME>",
"zone": "<GKE_INTERMEDIATE_VM_ZONE>",
"cluster_name": "<GKE_CLUSTER_NAME>",
"location": "<GKE_CLUSTER_LOCATION>",
"bucket": "<REGIONAL_BUCKET>",
"dataset": "<BQ_DATASET_PREFIX>",
"node_selector": "cloud.google.com/gke-accelerator-count=4,cloud.google.com/gke-nodepool=ct6e-pool,cloud.google.com/gke-tpu-accelerator=tpu-v6e-slice,cloud.google.com/gke-tpu-topology=2x2",
"resources_limits": "google.com/tpu=4",
"has_ssd": false,
"is_rapid_bucket": true
}
]Step 2: Host-Level Network Tuning Verification (SLA Requirement)
To achieve the target 20 GB/s sustained throughput for both HTTP/1.1 and gRPC:
- Verify LRO/GRO offloads and RFS/RPS packet steering are enabled on target host interfaces.
- If host interface tuning has not been applied, refer to Remediation Advisor to tune
ethtoolandsysctlsettings before launching benchmarks.
Step 3: Run State Management
Manage execution state prior to invoking npi_orchestrator.py:
- Clean Run / Retrigger: If starting a fresh run or recovering from a failed/corrupted execution state, remove existing state:
(This terminates lingering containers and mounts before relaunching).rm -f ~/.npi/npi_run_state.json - Resume Active Run: To resume an in-progress background run without starting over, keep
~/.npi/npi_run_state.jsonintact.
Step 4: GKE Control Plane Placement & Orchestrated Benchmark Execution
[!CRITICAL] GKE Control Plane Orchestration Architecture: All cluster credential retrieval commands (
gcloud container clusters get-credentials) andkubectljob dispatches MUST execute exclusively on the intermediate runner VM host environment (or orchestrator host) under strictKUBECONFIG=~/.kube/npi_kubeconfigenvironment isolation.Executing
gcloudcommands or fetching cluster credentials inside GKE worker node SSH shells is strictly prohibited as worker nodes run pod containers managed by the GKE control plane and lack cluster admin roles.
Run the orchestrator script from the host environment:
python3 npi_orchestrator.py --benchmarks "<BENCHMARK_LIST>" --image-version <IMAGE_VERSION> --iterations <ITERATION_COUNT>Example benchmark lists: read_parallel,write_parallel or all.
Step 5: Active Monitoring & Safety Policies
npi_orchestrator.py continuously monitors execution against safety rules:
- Inactivity Timeout: If no log output is detected for 4 hours (14,400s), the orchestrator automatically aborts the run to prevent hanging processes.
- Disk Space Protection: If storage buffer usage on target VM exceeds 85%, GCE runs are aborted to prevent disk exhaustion.
- GKE TPU Memory Management: Ensure
--use-memory-volumesflag is enabled innpi_gke.pyto mount buffers in RAM (tmpfs). Skip file cache tests (read_file_cache) on TPU slices to avoid host OOM crashes.
Step 6: Verify BigQuery Metric Export
Upon completion, the orchestrator exports collected metrics to BigQuery tables:
- Dataset Naming: Prefix from
targets.json+_regionalor_zonal(e.g.,npi_gke_orbax_regional). - Tables:
host_info(system specs),fio_<benchmark_name>(FIO metrics),go_client_read_<config>(Go SDK metrics).
Failure Modes & Edge Cases
| Failure Scenario | Root Cause | Remediation / Recovery Action |
| Invalid GKE Credential Context | gcloud container clusters get-credentials executed inside GKE worker node SSH shell | Abort. Execute gcloud container clusters get-credentials strictly on the intermediate runner VM host environment using KUBECONFIG=~/.kube/npi_kubeconfig. |
| 4-Hour Inactivity Log Stall | Benchmark execution hung due to deadlocked container or lost SSH connection | Orchestrator auto-aborts. Clean state file (rm -f ~/.npi/npi_run_state.json), check SSH socket health (ssh -O check ...), and retrigger. |
| Buffer Disk Usage > 85% | FIO write workloads exceeded storage buffer capacity | Abort run. Clean target mount buffer (/mnt/lssd/* or /tmp/npi_buffer/*), or increase buffer disk size. |
| GKE TPU Host OOM Crash | read_file_cache test executed on TPU slice using RAM disk buffer | Skip read_file_cache tests on TPU slices. Ensure --use-memory-volumes is set in npi_gke.py. |
| Corrupted Orchestrator State File | Invalid JSON formatting in ~/.npi/npi_run_state.json after process interruption | Execute rm -f ~/.npi/npi_run_state.json and relaunch npi_orchestrator.py. |
| BigQuery Export Failure | Expired GCP credentials or missing BigQuery Data Editor dataset permissions | Refresh credentials (gcloud auth login) and grant BigQuery dataset write roles to service account. |
Verification Checks
- Verify BigQuery Table Export:
Query the
host_infoandfio_*tables to confirm dataset population:-- Verify host metadata is recorded SELECT run_timestamp, cpu_arch, num_cpus, ram_bytes FROM `<PROJECT_ID>.<BQ_DATASET_ID>.host_info` ORDER BY run_timestamp DESC LIMIT 5; -- Verify FIO iteration count matches expected iterations SELECT COUNT(*) AS total_records FROM `<PROJECT_ID>.<BQ_DATASET_ID>.fio_read_grpc` WHERE image_version = '<IMAGE_VERSION>'; - Verify Record Count:
Ensure
total_recordsin BigQuery equalsiterations * target_count * test_matrix_rows. - Verify Execution Log:
Check
npi_commands.logfor zero error exit codes during execution.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

