Skip to content

Commit

Permalink
Add some documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
smoehrle committed Aug 31, 2022
1 parent bf9234d commit ecae4f8
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 10 deletions.
33 changes: 30 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Galaxy Benchmarker

TODO...
A tool for benchmarking different storage types individually or in more complex setups like Galaxy in combination with iRODS.

Link to the [original version](https://github.com/usegalaxy-eu/GalaxyBenchmarker/tree/668b9a5125541f686d00950a0e862a260ca4b787) of the GalaxyBenchmarker.

## Basic architecture

Expand All @@ -14,6 +16,7 @@ state after benchmarking.
```
.
├── ansible -- Ansible playbooks and inventory
├── evaluation -- Example plot code in jupiter notebooks
├── examples -- Example configurations
├── galaxy_benchmarker -- Source code
├── logs -- Generated logs
Expand All @@ -28,7 +31,9 @@ environment or as a local project. For the container env it automatically maps
SSH (config, agent, ...) inside the container. With this you can use your local
SSH config and keys within the inventory.

### Inside container
[Example usage described here](#example-usage)

### Run with container


```bash
Expand All @@ -52,7 +57,7 @@ make stop
make stop_sudo
```

### Local
### Run locally

This project requires [Poetry](https://python-poetry.org/docs/).

Expand All @@ -72,3 +77,25 @@ The targets/hosts are defined in [ansible/inventory/](./ansible/inventory/) as
Here, you can also set host specific variables, if necessary.

The defined hosts can then be used throughout the various benchmarker configs.

## Example usage

1. All examples use `irods_client` and `irods_server` as aliases for the hosts. These hosts have to be configured in [the inventory](./ansible/inventory/example.yml)
1. Run the GalaxyBenchmarker with `--cfg examples/01_verify_setup.yml` to verify the setup.


## Debugging

1. Change the configuration for more detailed logging
```
log_ansible_output: true
results_save_raw_results: true
```
1. Run GalaxyBenchmarker with the flags `--only-pre-task`, `--only-benchmark`, and `--only-post-task` to check the individual stages
1. Have a look into the logs of the container:
```
irods-fuse -> /tmp
irods -> /var/lib/irods/log/
```
16 changes: 12 additions & 4 deletions galaxy_benchmarker/benchmarks/fio.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,16 @@ def _parse_job_result(result: dict, prefix: str) -> dict[str, Any]:
f"{prefix}_iops_max": result["iops_max"],
f"{prefix}_iops_mean": result["iops_mean"],
f"{prefix}_iops_stddev": result["iops_stddev"],
f"{prefix}_lat_min_in_ms": result["lat_ns"]["min"] / 1_000_000 if result["bw_mean"] > 0 else 0.0,
f"{prefix}_lat_max_in_ms": result["lat_ns"]["max"] / 1_000_000 if result["bw_mean"] > 0 else 0.0,
f"{prefix}_lat_mean_in_ms": result["lat_ns"]["mean"] / 1_000_000 if result["bw_mean"] > 0 else 0.0,
f"{prefix}_lat_stddev_in_ms": result["lat_ns"]["stddev"] / 1_000_000 if result["bw_mean"] > 0 else 0.0,
f"{prefix}_lat_min_in_ms": result["lat_ns"]["min"] / 1_000_000
if result["bw_mean"] > 0
else 0.0,
f"{prefix}_lat_max_in_ms": result["lat_ns"]["max"] / 1_000_000
if result["bw_mean"] > 0
else 0.0,
f"{prefix}_lat_mean_in_ms": result["lat_ns"]["mean"] / 1_000_000
if result["bw_mean"] > 0
else 0.0,
f"{prefix}_lat_stddev_in_ms": result["lat_ns"]["stddev"] / 1_000_000
if result["bw_mean"] > 0
else 0.0,
}
9 changes: 6 additions & 3 deletions galaxy_benchmarker/benchmarks/galaxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ def __init__(self, name: str, config: dict, benchmarker: Benchmarker):
)
self._post_tasks.append(
ansible.AnsibleTask(
playbook="cleanup_galaxy_server.yml", host=self.destination.host,
playbook="cleanup_galaxy_server.yml",
host=self.destination.host,
extra_vars={
"galaxy_export_volume": self.config.export_volume,
},
Expand Down Expand Up @@ -254,7 +255,8 @@ def __init__(self, name: str, config: dict, benchmarker: Benchmarker):
)
self._post_tasks.append(
ansible.AnsibleTask(
playbook="cleanup_galaxy_server.yml", host=self.destination.host,
playbook="cleanup_galaxy_server.yml",
host=self.destination.host,
extra_vars={
"galaxy_export_volume": self.config.export_volume,
},
Expand Down Expand Up @@ -288,7 +290,8 @@ def __init__(self, name: str, config: dict, benchmarker: Benchmarker):
)
self._post_tasks.append(
ansible.AnsibleTask(
playbook="cleanup_galaxy_server.yml", host=self.destination.host,
playbook="cleanup_galaxy_server.yml",
host=self.destination.host,
extra_vars={
"galaxy_export_volume": self.config.export_volume,
},
Expand Down

0 comments on commit ecae4f8

Please sign in to comment.