Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[integ-tests] Improve scaling tests #6420

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,8 @@
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 +125,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 +139,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 +159,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 +215,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 }}

Loading