Skip to content

Commit

Permalink
additional change.
Browse files Browse the repository at this point in the history
Signed-off-by: Revital Sur <[email protected]>
  • Loading branch information
revit13 committed Oct 3, 2024
1 parent 0c483f4 commit 79f9126
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def profiler_compute_execution_params(
n_aggregators = math.ceil(number_of_docs * 32 / GB)
print(f"Estimated Required hashes {n_aggregators}")
print(f"Cluster available CPUs {cluster_cpu}, Memory {cluster_memory}")
required_aggregator_cpu = n_aggregators * aggregator_cpu
required_aggregator_cpu = math.ceil(n_aggregators * aggregator_cpu)
required_hash_mem = n_aggregators * 2
if required_aggregator_cpu > cluster_cpu or required_hash_mem > cluster_memory:
print(
Expand All @@ -93,7 +93,7 @@ def profiler_compute_execution_params(
# Define number of workers
n_workers = int((0.85 * cluster_cpu - required_aggregator_cpu) / actor_cpu)
print(f"Number of workers - {n_workers}")
if n_workers < 2:
if n_workers <= 0:
print(f"Cluster is too small - estimated number of workers {n_workers}")
sys.exit(1)
# Limit amount of workers and processors to prevent S3 saturation
Expand Down

0 comments on commit 79f9126

Please sign in to comment.