apurtell opened a new pull request, #2713:
URL: https://github.com/apache/phoenix/pull/2713

   This PR adds a Pherf agent harness for automated cluster verification and 
performance evaluation in Apache Phoenix.
   
   The work is split into five parts.
   
   1. The core harness under `dev/harness` builds Phoenix from the local source 
tree, starts a containerized ZooKeeper, HDFS, HBase, and Phoenix cluster on a 
single host, runs workloads through pluggable drivers, and produces a validated 
result bundle with automated verdicts. 
   
   2. Extensions to `phoenix-pherf` add `HdrHistogram` latency recording, open 
loop arrival rate pacing, an offline scenario
   validator and preflight checks, an automated workload health verdict, and 
statistical analysis and comparison tools for multi-replicate runs.
   
   3. A new model `phoenix-pherf-distributed` adds Distributed Pherf in which a 
central controller coordinates a fleet of agents driving a target cluster in 
parallel and folds their individual latency histograms into a combined fleet 
report. 
   
   4. A Kubernetes backend ties these all together onto Kubernetes, so a build 
can be checked on a local k3d cluster before
   its exact image digests are promoted to an external cluster.
   
   5. HOWTO documents walk Phoenix users, contributors, and commiters through 
performance engineering basics and use of the new harness and its capabilities 
to address Phoenix specific acceptance-, requirements-, and performance- 
testing needs. 
   
   ## Design
   
   The core harness is written in POSIX/Bash shell and leaves files outside 
`dev/` untouched. All container lifecycle and runtime operations go through a 
shared substrate contract with a fixed exit-code vocabulary. Each backend 
implements this contract and is the only layer that calls the underlying 
container runtime. 
   
   The harness defines two run classes backed by one committed sizing table. A 
_validation_ run checks that a build deploys, initializes, and executes 
workloads properly. It skips telemetry collectors and the quiet-host gate so it 
finishes quickly, and its timing results are advisory. A _measurement_ run 
evaluates performance with all collectors enabled on a quiet host. Both classes 
default to three DataNodes and three RegionServers with HDFS replication 3, and 
WAL replication follows the HDFS factor. The default small host tier fits a 
host of up to 32 GiB with a 24 GiB container engine, allowing a single 
developer machine to produce authoritative timing results. A larger tier for a 
64 GiB host with a 48 GiB engine, along with overlays for one on-demand role 
group, a one-DataNode one-RegionServer microbenchmark, and a RegionServer 
scale-out curve, provide a larger scaling point. 
   
   Operators and automated agents drive the harness through nine px-* commands 
that share an argument grammar, help layout, and exit-code vocabulary. When a 
cluster starts, the harness writes a persistent cluster record containing the 
active backend and resolved configuration options so follow-on commands inherit 
them without repeating flags. Lifecycle commands tear down only the resources 
they created. Each workload run writes a self-contained result bundle checked 
by an offline schema and integrity validator, and a shared verdict mapping 
converts evaluation outcomes into process exit codes across all commands. 
Because every bundle keeps the complete execution log for the run, read only 
bundle inspection commands can display verdicts, extracted performance metrics, 
and offline replicate analysis even when no cluster is running.
   
   ## Subtasks and patches
   
   Each JIRA subtask maps to one track patch and describes its architecture, 
verification record, and operational limits.
   
   - PHOENIX-8077 ("Pherf Harness: Phase 1: Harness and testing core") covers 
the substrate contract, the Docker Compose backend, preflight checks and host 
safety guards, the px-* CLI tools, workload drivers, result bundles, cluster 
health checks and verdict calculation, plug-ins, the performance measurement 
toolkit, and the offline self-test suite.
   - PHOENIX-8078 ("Pherf Harness: Phase 2: Single client Pherf enhancements 
and fixes") extends `phoenix-pherf` and updates the harness pherf driver to 
read the new structured report format.
   - PHOENIX-8079 ("Pherf Harness: Phase 3: Distributed Pherf") adds the new 
module for `phoenix-pherf-distributed`, its container image and standalone 
Compose stack, and the integrated harness tier and fleet suites.
   - PHOENIX-8080 ("Pherf Harness: Phase 4: Kubernetes backend"): adds the 
kubectl backend, Kubernetes preflight and safety checks, external cluster 
target definitions, the local k3d lifecycle helper, digest-pinned image 
promotion, the service mesh overlay, the Distributed Pherf Kubernetes tier, and 
the operator runbook for multi-node verification.
   - An additional patch provides HOWTO documents exploring performance 
engineering basics and providing guides and recipes for common acceptance-, 
functional, and performance-testing objectives likely to of interest to Phoenix 
users, contributors, and developers: how to smoke-test, A/B test, quantify, and 
root cause the performance of a change, along with background guides and the 
Pherf and Distributed Pherf tool guides, all written to a shared template and 
hub layout.
   
   In addition two changes are provisionally applied to prevent runtime 
failures that would otherwise be encountered during performance testing:
   
   1. PHOENIX-8045 (apache/phoenix PR #2657)
   2. PHOENIX-8072
   
   ## Testing
   
   A self-test runs offline and needs no Docker daemon, network access, or 
Maven build. 
   
   Along with the offline self-test suite, the completed tree builds cleanly 
with `mvn clean install -DskipTests`, and all unit tests in `phoenix-pherf` and 
`phoenix-pherf-distributed pass`.
   
   Live cluster testing was preformed on a single Docker engine on a 64 GB 
Apple Silicon M4 Max host. On the Docker Compose backend, live sessions checked 
cluster startup across varied RegionServer replica counts, smoke and functional 
suites across all workload drivers, fault injection and automated recovery, 
telemetry collection, the Distributed Pherf fleet suites, and a live recapture 
of the HOWTO command transcripts, backed by an automated check confirming that 
each transcript line matched the live output verbatim. 
   
   With the local k3d Kubernetes backend, live testing verified cluster setup 
and fault detection, functional and deterministic count parity with Compose 
under the same configuration, Distributed Pherf execution over a loopback 
tunnel, run state continuity across controller pod replacement, dynamic agent 
scaling and latency histogram aggregation, preflight refusal of a meshed 
startup when no sidecar injector is present, an end-to-end meshed fleet run 
under Istio paired with promotion of a k3d bundle to a container registry, and 
a multi-node verification pass on a three node k3d cluster for both run classes 
on the tree right before the HOWTO review. That multi-node pass confirmed node 
local persistent storage binding for all pods, anti-affine placement of 
DataNodes, RegionServers, and Pherf agents onto separate nodes, sub-50 ms fleet 
start skew and accurate cross-node histogram merging, drain aware RegionServer 
restarts both standalone and during an active run, dynamic agent scaling, 
 and clean namespace removal.
   
   ## Backend scope
   
   Two execution targets are vetted in this initial deliverable: Docker Compose 
and a local k3d Kubernetes cluster.
   
   Remote Kubernetes clusters are supported by design, though they have not yet 
been tested on physical multi-host infrastructure. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to