Skip to content

Conversation

@lokeshrangineni
Copy link
Contributor

@lokeshrangineni lokeshrangineni commented Jul 7, 2025

Major improvements to Oracle benchmark automation:

• SwingBench Integration

• Project Structure Reorganization:

  • Reorganize HammerDB scripts into organized hammerdb/ directory
  • Create dedicated swingbench/ directory for SwingBench scripts
  • Add main playbooks for complete benchmark suite setup
  • Improve directory structure for better maintainability

@lokeshrangineni lokeshrangineni force-pushed the feature/swingbench-automation-reorg branch from b42ec79 to e121efb Compare July 7, 2025 13:51
hammerdb_base_path: "{{ benchmark_base_path }}/hammerdb"
hammerdb_install_path: "{{ hammerdb_base_path }}/{{ hammerdb_version }}"

# SwingBench Setup (Unix/Linux/Windows JDK 11, Updated November 4th 2023)
Copy link
Contributor

Choose a reason for hiding this comment

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

WDYT keeping both HamerDB and swing bench installation separeted each other. including inventory and configuration. WDYT ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That makes sense. I will make necessary changes.

Copy link
Contributor

Choose a reason for hiding this comment

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

we can re-use if there any existing configuration for example TNS configuration incase swing-bench depend on it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i tried to play around with this to separate it out but i think we are not there yet but i came up with a kind of hybrid approach at the same won't add the complexity. Added a benchmark_tool which keeps the current behaviour without additional configurations needed. I tried to separate out the inventory as well but it needs two separate configurations for the vms as well which is a bit unnecessary. I am still testing if all the scenarios are covered but want to get your opinion.

Copy link
Contributor

Choose a reason for hiding this comment

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

we can with hybrid approach, by making default hamerdb and making swing bench optional ? WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was doing All. because it is just installing and it is up to the user to decide what tool to use. but I am fine to keep hammerdb as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

We refer to this repo with HammerDB in the documentation, so I think we better to keep HammerDB as the default installation.
Swing-bench another good tool but I think let's make it optional at the moment. something I am also not aware how it works and how is useful or what advantage it has.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated to hammerdb as default option.

- name: Install and setup HammerDB for TPC-C benchmarks
import_playbook: playbooks/setup-hammerdb/install_setup_hammer_db.yml

- name: Install and setup SwingBench for SOE benchmarks
Copy link
Contributor

Choose a reason for hiding this comment

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

same here if we keep both(HamerDB+SwingBench) setup and configuration separte

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added separate playbooks and also conditional playbooks as well for convenience.

hammerdb_version: 4.12
hammerdb_base_path: /opt/HammerDB
oracle_client_home: /usr/lib/oracle/19.26/client64
# Benchmark Tool Selection (enum-like variable)
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious about the variables moved to three separate files? I think Keeping them in one place and changing them in a single file is easier compared to managing three different files. Especially when there are very few var to change, like in the newly created files hammerdb.yaml or swingbench.yaml under the vars folder.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

then we are going to back to the original approach only. It is not a big deal to change TBH as it keeps it separate and organizes better. but I am fine to keep it in one file as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted back to the original approach.

@lokeshrangineni lokeshrangineni force-pushed the feature/swingbench-automation-reorg branch from 1e3b525 to 4afd831 Compare July 9, 2025 03:51
README.md Outdated
oracle_client_home=/usr/lib/oracle/19.26/client64
```
5. **Update Environment Variables for HamerDB Script**
#### Benefits of Consolidated Variables:
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure this explanation required

ansible_host: <control machine ip or host>
ansible_user: <control machine user>
ansible_ssh_private_key_file: < path of ansible_ssh_private_key_file like .pem file>
ansible_host: 172.21.67.22
Copy link
Contributor

@redhatHameed redhatHameed Jul 9, 2025

Choose a reason for hiding this comment

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

can we remove this ip address please thanks

oracle_tns_entries:
- tns_name: "ORALAB"
host: <oralab-oracle-rac host name>
host: oralab-scan.oracle-rac.openinfra.lab
Copy link
Contributor

Choose a reason for hiding this comment

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

same here this host required to removed

README.md Outdated
### Build the schema
### Variable Structure

Variables are organized into separate files for better maintainability:
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure this is still correct, considering the variables moved under single file

### 2. Test & Run Ansible Playbooks
# Override at runtime to install specific tools
ansible-playbook -i inventory.yaml main_setup_conditional_benchmark.yml -e benchmark_tool=hammerdb
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we don't required to mention hammerdb also can we mention some explanation here that default installation is hammerdb WDYT ?

README.md Outdated
ansible-playbook -i inventory.yaml main_setup_conditional_benchmark.yml -e benchmark_tool=all
Navigate to the `ansible` directory on your control node.
# Install both tools (default)
Copy link
Contributor

Choose a reason for hiding this comment

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

is this correct ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it got messed up during the rewriting of this git history to erase IP addresses. Please wait until i fix it up.

@lokeshrangineni lokeshrangineni force-pushed the feature/swingbench-automation-reorg branch from 4afd831 to 9e3bbd6 Compare July 9, 2025 14:36
- Set benchmark_tool default to 'hammerdb' (was 'all')
- Consolidated variables into inventory.yaml, removed vars/ directory
- Added conditional benchmark installation based on benchmark_tool variable
- Complete SwingBench automation with SOE schema setup
- Reorganized scripts into tool-specific directories (hammerdb/, swingbench/)
- Updated all documentation to reflect hammerdb as default
- Enhanced security: no sensitive info, proper placeholders everywhere
- Added comprehensive logging and error handling
- Updated README.md to show benchmark_tool default as 'hammerdb' instead of 'all'
- Fixed default() filter in README-benchmark-tool-variable.md to use 'hammerdb'
- Removed obsolete 'Variable Structure' section from README.md
- Enhanced SwingBench troubleshooting section with current script capabilities
- All documentation now correctly reflects hammerdb as the default tool
@lokeshrangineni lokeshrangineni force-pushed the feature/swingbench-automation-reorg branch from 96fac02 to 6b403f8 Compare July 9, 2025 15:59
- Reordered HammerDB configuration before SwingBench in variable examples
- Added '- Default Tool' emphasis to HammerDB sections
- Consistent ordering reflects benchmark_tool default value of 'hammerdb'
- Improved user experience by presenting default option first
- Fixed hardcoded localhost connection in build-soe-schema.sh
  • Replaced 'localhost:1521:xe' with $ORACLE_SID variable
  • Now uses $SOE_USER, $SOE_PASSWORD, $SCALE_FACTOR in XML config
  • Resolves connection issues when client is on different machine

- Removed dev-tools security files (should be external to project)
  • Deleted ~/dev-tools/security/README.md
  • Deleted ~/dev-tools/security/github-action-security-scan.yml

- Documentation cleanup
  • Removed obsolete 'Variable Management' section from directory-structure.md
  • Updated ansible/readme.md

Changes ready for testing with proper host/password configuration.
- Fix runtime parameter: RUN_TIME=1 now correctly means 1 minute, not 1 hour
- Simplify schema creation: use command line parameters instead of XML templates
- Add missing user_home_path variable for Oracle client setup
- Update results handling: save XML files directly to results directory
- Sanitize inventory.yaml: replace sensitive values with placeholders
- Update documentation: reflect simplified approach and new file structure
│ ├── run.tcl # TCL script to run the test
└── templates # Ansible templates
/opt/ocpv-benchmark/ # Base installation directory
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this structure on vm should be independent for example as done currently WDYT ?

/opt/ocpv-benchmark/
├── hammerdb/
│   ├── installation/
│   ├── scripts/
│   
│   
├── swingbench/
│   ├── installation/
│   ├── scripts/
│     
└── tns/








# This file contains environment variables for HammerDB benchmarking

# Oracle Database Connection
export ORACLE_SYSTEM_PASSWORD=Chang4On
Copy link
Contributor

Choose a reason for hiding this comment

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

can we make this ORACLE_SYSTEM_PASSWORD dynamic or take it inventory variables ?

export ORA_MINUTES_DURATION=5
export PROFILE=small
export DROP_TPCC_SCHEMA_FOR_EACH_BENCHMARK=true

Copy link
Contributor

Choose a reason for hiding this comment

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

same here to use from variables or from env file

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.

3 participants