Skip to content

Commit c20433e

Browse files
Enabled CPU pinning on self-contained-coordinator (#90)
1 parent ce34247 commit c20433e

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

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 = "redis-benchmarks-specification"
3-
version = "0.1.23"
3+
version = "0.1.24"
44
description = "The Redis benchmarks specification describes the cross-language/tools requirements and expectations to foster performance and observability standards around redis related technologies. Members from both industry and academia, including organizations and individuals are encouraged to contribute."
55
authors = ["filipecosta90 <[email protected]>","Redis Performance Group <[email protected]>"]
66
readme = "Readme.md"

redis_benchmarks_specification/__self_contained_coordinator__/args.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def create_self_contained_coordinator_args(project_name):
3636
default=MACHINE_CPU_COUNT,
3737
help="Specify how much of the available CPU resources the coordinator can use.",
3838
)
39+
parser.add_argument("--cpuset_start_pos", type=int, default=0)
3940
parser.add_argument(
4041
"--platform-name",
4142
type=str,

redis_benchmarks_specification/__self_contained_coordinator__/self_contained_coordinator.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ def main():
172172
stream_id = None
173173
docker_client = docker.from_env()
174174
home = str(Path.home())
175+
cpuset_start_pos = args.cpuset_start_pos
176+
logging.info("Start CPU pinning at position {}".format(cpuset_start_pos))
177+
175178
# TODO: confirm we do have enough cores to run the spec
176179
# availabe_cpus = args.cpu_count
177180
datasink_push_results_redistimeseries = args.datasink_push_results_redistimeseries
@@ -207,6 +210,7 @@ def main():
207210
profilers_enabled,
208211
profilers_list,
209212
grafana_profile_dashboard,
213+
cpuset_start_pos,
210214
)
211215

212216

@@ -251,6 +255,7 @@ def self_contained_coordinator_blocking_read(
251255
profilers_enabled,
252256
profilers_list,
253257
grafana_profile_dashboard="",
258+
cpuset_start_pos=0,
254259
):
255260
num_process_streams = 0
256261
num_process_test_suites = 0
@@ -285,6 +290,7 @@ def self_contained_coordinator_blocking_read(
285290
profilers_enabled,
286291
profilers_list,
287292
grafana_profile_dashboard,
293+
cpuset_start_pos,
288294
)
289295
num_process_streams = num_process_streams + 1
290296
num_process_test_suites = num_process_test_suites + total_test_suite_runs
@@ -350,6 +356,7 @@ def process_self_contained_coordinator_stream(
350356
profilers_enabled=False,
351357
profilers_list=[],
352358
grafana_profile_dashboard="",
359+
cpuset_start_pos=0,
353360
):
354361
stream_id = "n/a"
355362
overall_result = False
@@ -416,7 +423,7 @@ def process_self_contained_coordinator_stream(
416423
for topology_spec_name in benchmark_config["redis-topologies"]:
417424
test_result = False
418425
try:
419-
current_cpu_pos = 0
426+
current_cpu_pos = cpuset_start_pos
420427
ceil_db_cpu_limit = extract_db_cpu_limit(
421428
topologies_map, topology_spec_name
422429
)

0 commit comments

Comments
 (0)