{"id":30188685,"url":"https://github.com/rhecosystemappeng/oracle-ocpv-benchmark","last_synced_at":"2025-10-26T16:08:28.022Z","repository":{"id":300995967,"uuid":"962852993","full_name":"RHEcosystemAppEng/oracle-ocpv-benchmark","owner":"RHEcosystemAppEng","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-21T19:20:02.000Z","size":1262,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-21T21:31:02.068Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Tcl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RHEcosystemAppEng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-08T19:15:49.000Z","updated_at":"2025-07-16T15:38:15.000Z","dependencies_parsed_at":"2025-06-24T16:48:59.472Z","dependency_job_id":"fac281b3-9974-4e7e-b1ca-695bee3ad4b2","html_url":"https://github.com/RHEcosystemAppEng/oracle-ocpv-benchmark","commit_stats":null,"previous_names":["rhecosystemappeng/oracle-ocpv-benchmark"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RHEcosystemAppEng/oracle-ocpv-benchmark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RHEcosystemAppEng%2Foracle-ocpv-benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RHEcosystemAppEng%2Foracle-ocpv-benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RHEcosystemAppEng%2Foracle-ocpv-benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RHEcosystemAppEng%2Foracle-ocpv-benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RHEcosystemAppEng","download_url":"https://codeload.github.com/RHEcosystemAppEng/oracle-ocpv-benchmark/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RHEcosystemAppEng%2Foracle-ocpv-benchmark/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270108960,"owners_count":24528772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-12T17:45:53.874Z","updated_at":"2025-10-26T16:08:22.963Z","avatar_url":"https://github.com/RHEcosystemAppEng.png","language":"Tcl","funding_links":[],"categories":[],"sub_categories":[],"readme":"#  Oracle Benchmarking \u0026 Observability on OpenShift Virtualization\n\nThis repo automates the setup and execution of **HammerDB TPC-C benchmarks** against Oracle databases.We leverage Ansible for provisioning and configuring the environment, enabling automated benchmark execution. \nThe solution also provides instructions on how to integrate Oracle's Observability Exporter with Grafana to create an OpenShift-native observability stack. Our primary objective is to automate Oracle performance testing on RHEL VMs provisioned via OpenShift Virtualization\n\n\n\u003e [!NOTE]\n\u003e 📢📢📢 **Red Hat Validation**: These benchmarks have been used by Red Hat to validate the solution on OpenShift Virtualization. For details, refer to http://redhat.com/en/blog/single-instance-oracle-database-openshift-virtualization, and contact Red Hat for further details.\n\n## Project Functionality\n\nThis project provides the necessary tooling to automate **Oracle TPC-C benchmark runs** using [HammerDB](https://hammerdb.com/). Included **Ansible playbooks** handle:\n\n* Installation of Oracle client tools.\n* Deployment of HammerDB itself.\n* Configuration via custom TCL scripts and the TNS Ora file for HammerDB.\n\nOnce the environment is deployed, you can initiate **standardized database load tests** directly on the provisioned VM.\n\nBeyond benchmarking, this solution also **provides guidance on:**\n\n* **Prometheus-compatible metric collection** from the Oracle DB using the Oracle Observability Exporter.\n* **Visualization of these metrics** through pre-configured Grafana dashboards on OpenShift.\n\n---\n\n## Oracle RAC Performance Test Architecture\n\n![rac-performance_test-arc.png](rac-performance_test-arc.png)\n\n---\n\n## Project Structure\n\nGithub Project Structure:\n```\n└── ansible\n    ├── playbooks                                # Ansible playbooks\n    │   ├── configure-tnsnames                   # Ansible playbook to configure tnsnames.ora file \n    │   ├── oracle-client                        # Ansble playbook to install oracle client\n    │   └── setup-hammerdb                       # Ansible playbook to install hammerdb and copy the necessary custom scripts under scripts directory to VM.  \n    ├── scripts\n    │   ├── build.sh                             # Builds TPCC schema\n    │   ├── run.sh                               # Runs workload benchmark\n    │   ├── build-and-run.sh                     # Builds and Runs workload benchmark\n    │   ├── build.tcl                            # TCL script for schema creation\n    │   ├── run.tcl                              # TCL script to run the test\n    │\n    └── templates                                # Ansible templates\n```\n\n## Requirements\n\n* A RHEL managed VM (on OpenShift Virtualization).\n* Python + Ansible \u003c2.10 installed on your control machine (e.g., your dev workstation).\n* Access to an OpenShift cluster (for the monitoring stack).\n* OpenShift CLI (`oc`) configured.\n\n**Ansible Version Check:**\n\nEnsure Ansible is `\u003c2.10`:\n```bash\npip install \"ansible\u003c2.10\"\nansible-playbook --version\n```\n\n### 1. Ansible Inventory and Parameters Configuration\n\nBefore running any playbooks, configure your environment variables and Ansible inventory.\n\n\n1. **Update `inventory.yaml`**:\n   Define your target HammerDB client VM details.\n\n```\n      hammerdb_oracle_client_vms ansible_host=\u003cvm-host\u003e ansible_user=\u003cvm_user\u003e ansible_ssh_private_key_file=\u003c\u003e \n```\n\n2. **TNS Configuration**\n   Configure Oracle client connectivity via `tnsnames.ora`. These variables define the connection parameters for your Oracle environment. \n   Note: `tnsnames.ora` is set as read-only post-configuration. \n```\n       oracle_host=\u003cyour_oracle_scan_or_host\u003e  # e.g., oracle RAC host name\n       oracle_port=1521                        # Oracle listener port\n       oracle_sid=pdb1                         # e.g., pdb1\n       oracle_tns_name=ORALAB\n       tns_admin_path=/opt/HammerDB/hammerdb-oracle-tns\n```\n \n3. **Oracle Client Installation**\n   Specify Oracle Instant Client RPMs. Default is 19.26, but configurable.\n\n```\n    oracle_major_version=19.26\n    oracle_minor_version=0.0.0-1.el8\n    base_url=https://yum.oracle.com/repo/OracleLinux/OL8/oracle/instantclient/x86_64/getPackage\n    oracle_home_path=/usr/lib/oracle/19.26/client64\n``` \n   \n4. **HammerDB Setup**\n   Define HammerDB version and installation paths. Current default is 4.12.\n```\n      hammerdb_version=4.12\n      hammerdb_base_path=/opt/HammerDB\n      oracle_client_home=/usr/lib/oracle/19.26/client64\n```\n5. **Update Environment Variables for HamerDB Script**\n\nYou have .env file to set up all the environment variables required for the benchmark.\nPlease update below environemnt variables:\n\n```bash\n#password for oracle system user.\nexport ORACLE_SYSTEM_PASSWORD=yourpassword\n#and if required any other variables  \n\n```\n\n\n### 2. Test \u0026 Run Ansible Playbooks\n\nNavigate to the `ansible` directory on your control node.\n\n\n\n```shell\n\ncd ansible\n#Test the connection:\n\nansible -i inventory.yaml -m ping hammerdb_oracle_client_vms\n\n\n#Run the playbook to install all required dependencies.\nansible-playbook -i inventory.yaml main_setup_oracle_hammerdb_benchmark.yml\n```\n\nIndividual playbooks can also be executed for granular updates:\n\n\n```shell\n# Install Oracle client\nansible-playbook -i inventory.yaml playbooks/oracle-client/install_oracle_client.yml\n\n# Configure tnsnames.ora\nansible-playbook -i inventory.yaml playbooks/configure-tnsnames/configure_tnsnames.yml\n\n# Install HammerDB and copy scripts\nansible-playbook -i inventory.yaml playbooks/setup-hammerdb/install_setup_hammer_db.yml\n```\n\n\n## Running the Benchmark\n\nPost-Ansible execution, your target VM should have the following directory structure (default base path: /opt/HammerDB): All the dependencies will be inside location as you configured the path with `benchmark_scripts` folder will have all the custom scripts to run the benchmark.\n`hammerdb-oracle-tns` will have the tnsnames.ora file.\n\n```shell\n[cloud-user@lrangine-vm01 opt]$ tree -d -L 2 /opt/HammerDB\n/opt/HammerDB\n|-- 4.12\n|   |-- agent\n|   |-- bin\n|   |-- config\n|   |-- images\n|   |-- include\n|   |-- lib\n|   |-- modules\n|   |-- scripts\n|   `-- src\n|-- benchmark_scripts\n|   `-- results\n`-- hammerdb-oracle-tns\n\n13 directories\n```\n\nGo to folder `/opt/HammerDB/benchmark_scripts` on the client VM.\n### Build the schema\n```bash\n./build.sh\n```\n\n### Run the workload\n```bash\n./run.sh\n```\n\n### Run with Profiles\n\nThe scripts currently support three profiles: small, medium, and large.\n\nUse them to control load size (virtual users, warehouses, duration, etc.) by editing `profile.sh` file\n\n```bash\nPROFILE=small ./build.sh\nPROFILE=small ./run.sh\n```\nOr run both in a single step:\n\n```PROFILE=small ./build-and-run.sh```\n```PROFILE=scale-run ./build-and-run.sh```\n\n**Note**: Required to cleannup the schema before running each profile\n\n\n### Output\n\nLogs are saved to:\n```\nresults/hammerdb_run_\u003ctimestamp\u003e.log\nresults/hammerdb_nopm_\u003ctimestamp\u003e.log\n```\n\nneed to create the CSV output then Run:\n```bash\n./create-csv-result.sh\n```\n\n## Resetting the Schema\n\n```sql\n-- Run the [drop_tpcc_user.sh](ansible/scripts/drop_tpcc_user.sh) script on target client VM. Usually it will be under `/opt/HammerDB/benchmark_scripts`. This script drops the tpcc schema/user.\n./drop_tpcc_user.sh\n```\n\n## Common Issues\n\n### ORA-12154: Could not resolve connect identifier\n- Likely a bad or missing `tnsnames.ora`\n- Double-check your `TNS_ADMIN` path\n\n### ORA-65096: Common user or role name must start with C##\n- You're probably trying to create a user in the CDB root\n- Switch to a pluggable database (like `pdb1`)\n- Or manually create the user with `C##` prefix before running the scripts\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhecosystemappeng%2Foracle-ocpv-benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhecosystemappeng%2Foracle-ocpv-benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhecosystemappeng%2Foracle-ocpv-benchmark/lists"}