Skip to content

Commit 96d4928

Browse files
In case of remote rdb fetch and remote run will copy directly from remote file to DB machine (remove extra hop) (#305)
1 parent f0f246e commit 96d4928

File tree

5 files changed

+39
-11
lines changed

5 files changed

+39
-11
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Current supported benchmark tools:
2424
- [tsbs](https://github.com/RedisTimeSeries/tsbs)
2525
- [redisgraph-benchmark-go](https://github.com/RedisGraph/redisgraph-benchmark-go)
2626
- [ftsb_redisearch](https://github.com/RediSearch/ftsb)
27+
- [ann-benchmarks](https://github.com/RedisAI/ann-benchmarks)
2728
- [SOON][aibench](https://github.com/RedisAI/aibench)
2829

2930
## Installation

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "redisbench-admin"
3-
version = "0.7.4"
3+
version = "0.7.5"
44
description = "Redis benchmark run helper. A wrapper around Redis and Redis Modules benchmark tools ( ftsb_redisearch, memtier_benchmark, redis-benchmark, aibench, etc... )."
55
authors = ["filipecosta90 <filipecosta.90@gmail.com>","Redis Performance Group <performance@redis.com>"]
66
readme = "README.md"

redisbench_admin/run_remote/remote_client.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,18 @@ def run_remote_client_tool(
133133
stdout,
134134
tmp,
135135
)
136+
else:
137+
logging.error(
138+
"Given the remote tool failed, inspecting the remote results file content ({})".format(
139+
remote_results_file
140+
)
141+
)
142+
command = ["cat {}".format(remote_results_file)]
143+
recv_exit_status, stdout, stderr = execute_remote_commands(
144+
client_public_ip, username, private_key, [command], client_ssh_port
145+
)[0]
146+
logging.warning("Remote results file content: {}".format(stdout))
147+
136148
return (
137149
artifact_version,
138150
benchmark_duration_seconds,

redisbench_admin/utils/local.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def check_dataset_local_requirements(
2121
dbconfig_keyname="dbconfig",
2222
number_primaries=1,
2323
is_cluster=False,
24+
is_remote=False,
2425
):
2526
dataset = None
2627
dataset_name = None
@@ -34,7 +35,7 @@ def check_dataset_local_requirements(
3435
dataset_name = k["dataset_name"]
3536
if dataset is not None:
3637
full_path = check_if_needs_remote_fetch(
37-
dataset, datasets_localtemp_dir, dirname
38+
dataset, datasets_localtemp_dir, dirname, None, is_remote
3839
)
3940

4041
if is_cluster is False:

redisbench_admin/utils/remote.py

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ def check_dataset_remote_requirements(
177177
"dbconfig",
178178
number_primaries,
179179
False,
180+
True,
180181
)
181182
if dataset is not None:
182183
logging.info(
@@ -196,15 +197,28 @@ def check_dataset_remote_requirements(
196197
fullpath, server_public_ip, remote_dataset_file
197198
)
198199
)
199-
res = copy_file_to_remote_setup(
200-
server_public_ip,
201-
username,
202-
private_key,
203-
fullpath,
204-
remote_dataset_file,
205-
None,
206-
db_ssh_port,
207-
)
200+
if "https" in dataset:
201+
logging.info(
202+
"Given dataset is a remote one ( {} ), copying it directly to DB machine ( {} ).".format(
203+
dataset,
204+
remote_dataset_file,
205+
)
206+
)
207+
commands = []
208+
commands.append("wget -O {} {}".format(remote_dataset_file, dataset))
209+
execute_remote_commands(
210+
server_public_ip, username, private_key, commands, db_ssh_port
211+
)
212+
else:
213+
res = copy_file_to_remote_setup(
214+
server_public_ip,
215+
username,
216+
private_key,
217+
fullpath,
218+
remote_dataset_file,
219+
None,
220+
db_ssh_port,
221+
)
208222
if is_cluster:
209223
commands = []
210224
for master_shard_id in range(2, number_primaries + 1):

0 commit comments

Comments
 (0)