Skip to content

Commit

Permalink
[integ-tests] Improve scaling tests
Browse files Browse the repository at this point in the history
1. Use multiple AZs to get more capacity
2. Use t3.medium for compute nodes. Because t3.medium has more capacity than c5.large.
3. Use c5n.18xlarge (instead of c5.24xlarge) as head node because the bottleneck is the networking.
4. Add more dynamic nodes to the clusters. Therefore, the tests are testing cluster with 160k dynamic compute nodes, in addition to scaling up / down with maximum 4000 nodes.

Signed-off-by: Hanwen <[email protected]>
  • Loading branch information
hanwen-pcluste committed Aug 29, 2024
1 parent e59f3f5 commit 7e01b3d
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 8 deletions.
8 changes: 4 additions & 4 deletions tests/integration-tests/configs/scaling_stress_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ test-suites:
performance_tests:
test_scaling.py::test_scaling_stress_test:
dimensions:
- regions: [ "use1-az6" ]
instances: [ "c5.large" ]
- regions: [ "us-east-1" ]
instances: [ "t3.medium" ]
oss: [ "alinux2" ]
schedulers: [ "slurm" ]
test_scaling.py::test_static_scaling_stress_test:
dimensions:
- regions: [ "use1-az6" ]
instances: [ "c5.large" ]
- regions: [ "us-east-1" ]
instances: [ "t3.medium" ]
oss: [ "alinux2" ]
schedulers: [ "slurm" ]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MaxMonitoringTimeInMins: 20
ScalingTargets: [1000, 2000, 3000, 4000]
SharedHeadNodeStorageType: 'Efs'
HeadNodeInstanceType: 'c5.24xlarge'
HeadNodeInstanceType: 'c5n.18xlarge'
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from tests.common.assertions import assert_no_msg_in_logs
from tests.common.scaling_common import get_bootstrap_errors, get_scaling_metrics, validate_and_get_scaling_test_config

MAX_QUEUE_SIZE = 50000

@pytest.mark.parametrize(
"max_nodes",
Expand Down Expand Up @@ -123,7 +124,7 @@ def test_scaling_stress_test(
cluster_config = pcluster_config_reader(
# Prevent nodes being set down before we start monitoring the scale down metrics
scaledown_idletime=max_monitoring_time_in_mins,
max_cluster_size=max(scaling_targets),
max_cluster_size=MAX_QUEUE_SIZE,
head_node_instance_type=head_node_instance_type,
shared_headnode_storage_type=shared_headnode_storage_type,
scaling_strategy=scaling_strategy,
Expand All @@ -137,6 +138,7 @@ def test_scaling_stress_test(

with soft_assertions():
for scaling_target in scaling_targets:
logging.info("Scaling to %d nodes", scaling_target)
_scale_up_and_down(
cluster,
head_node_instance_type,
Expand All @@ -156,7 +158,7 @@ def test_scaling_stress_test(
# ref https://docs.aws.amazon.com/AWSEC2/latest/APIReference/throttling.html
if scaling_target != scaling_targets[-1]:
logging.info("Waiting for the RunInstances Resource Token Bucket to refill")
time.sleep(300)
time.sleep(500)


@pytest.mark.usefixtures("scheduler")
Expand Down Expand Up @@ -212,7 +214,7 @@ def test_static_scaling_stress_test(
shared_headnode_storage_type=shared_headnode_storage_type,
scaling_strategy=scaling_strategy,
min_cluster_size=scaling_target,
max_cluster_size=scaling_target,
max_cluster_size=MAX_QUEUE_SIZE,
output_file=f"{scaling_target}-upscale-pcluster.config.yaml",
)
_scale_up_and_down(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,28 @@ Scheduling:
MaxCount: {{ max_cluster_size }}
Networking:
SubnetIds:
{% for private_subnet_id in private_subnet_ids %}
- {{ private_subnet_id }}
{% endfor %}
- Name: queue-1
ComputeResources:
- Name: compute-resource-2
Instances:
- InstanceType: {{ instance }}
MaxCount: {{ max_cluster_size }}
Networking:
SubnetIds:
{% for private_subnet_id in private_subnet_ids %}
- {{ private_subnet_id }}
{% endfor %}
- Name: queue-2
ComputeResources:
- Name: compute-resource-2
Instances:
- InstanceType: {{ instance }}
MaxCount: {{ max_cluster_size }}
Networking:
SubnetIds:
{% for private_subnet_id in private_subnet_ids %}
- {{ private_subnet_id }}
{% endfor %}
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,22 @@ Scheduling:
Networking:
SubnetIds:
- {{ private_subnet_id }}
- Name: dynamic-1
ComputeResources:
- Name: compute-resource-1
InstanceType: {{ instance }}
MinCount: 0
MaxCount: {{ max_cluster_size }}
Networking:
SubnetIds:
- {{ private_subnet_id }}
- Name: dynamic-2
ComputeResources:
- Name: compute-resource-2
InstanceType: {{ instance }}
MinCount: 0
MaxCount: {{ max_cluster_size }}
Networking:
SubnetIds:
- {{ private_subnet_id }}

0 comments on commit 7e01b3d

Please sign in to comment.