Skip to content

Commit

Permalink
Enabled CPU pinning on self-contained-coordinator (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
filipecosta90 authored Apr 24, 2022
1 parent ce34247 commit c20433e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "redis-benchmarks-specification"
version = "0.1.23"
version = "0.1.24"
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."
authors = ["filipecosta90 <[email protected]>","Redis Performance Group <[email protected]>"]
readme = "Readme.md"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def create_self_contained_coordinator_args(project_name):
default=MACHINE_CPU_COUNT,
help="Specify how much of the available CPU resources the coordinator can use.",
)
parser.add_argument("--cpuset_start_pos", type=int, default=0)
parser.add_argument(
"--platform-name",
type=str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ def main():
stream_id = None
docker_client = docker.from_env()
home = str(Path.home())
cpuset_start_pos = args.cpuset_start_pos
logging.info("Start CPU pinning at position {}".format(cpuset_start_pos))

# TODO: confirm we do have enough cores to run the spec
# availabe_cpus = args.cpu_count
datasink_push_results_redistimeseries = args.datasink_push_results_redistimeseries
Expand Down Expand Up @@ -207,6 +210,7 @@ def main():
profilers_enabled,
profilers_list,
grafana_profile_dashboard,
cpuset_start_pos,
)


Expand Down Expand Up @@ -251,6 +255,7 @@ def self_contained_coordinator_blocking_read(
profilers_enabled,
profilers_list,
grafana_profile_dashboard="",
cpuset_start_pos=0,
):
num_process_streams = 0
num_process_test_suites = 0
Expand Down Expand Up @@ -285,6 +290,7 @@ def self_contained_coordinator_blocking_read(
profilers_enabled,
profilers_list,
grafana_profile_dashboard,
cpuset_start_pos,
)
num_process_streams = num_process_streams + 1
num_process_test_suites = num_process_test_suites + total_test_suite_runs
Expand Down Expand Up @@ -350,6 +356,7 @@ def process_self_contained_coordinator_stream(
profilers_enabled=False,
profilers_list=[],
grafana_profile_dashboard="",
cpuset_start_pos=0,
):
stream_id = "n/a"
overall_result = False
Expand Down Expand Up @@ -416,7 +423,7 @@ def process_self_contained_coordinator_stream(
for topology_spec_name in benchmark_config["redis-topologies"]:
test_result = False
try:
current_cpu_pos = 0
current_cpu_pos = cpuset_start_pos
ceil_db_cpu_limit = extract_db_cpu_limit(
topologies_map, topology_spec_name
)
Expand Down

0 comments on commit c20433e

Please sign in to comment.