From 634e1c3d6ffa1037c5a92188743e6fa87175cf51 Mon Sep 17 00:00:00 2001 From: Zilong Zhou Date: Tue, 24 Jun 2025 15:35:38 +0800 Subject: [PATCH] Reduce the startup time of the software on AWS from one minute to five seconds. (#221) * feat: use SSD with high throughput * fix&refactor: update AMI ID and change EBS volume type to gp3 with adjusted IOPS and throughput --- desktop_env/providers/aws/manager.py | 9 ++++++--- desktop_env/providers/aws/provider.py | 7 +++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/desktop_env/providers/aws/manager.py b/desktop_env/providers/aws/manager.py index 0b24b0f..bcc89c5 100644 --- a/desktop_env/providers/aws/manager.py +++ b/desktop_env/providers/aws/manager.py @@ -35,7 +35,7 @@ DEFAULT_REGION = "us-east-1" # todo: Add doc for the configuration of image, security group and network interface # todo: public the AMI images IMAGE_ID_MAP = { - "us-east-1": "ami-03a22c6e501415fb1", + "us-east-1": "ami-025b3f907e5c1b805", "ap-east-1": "ami-0c092a5b8be4116f5", } @@ -102,8 +102,11 @@ def _allocate_vm(region=DEFAULT_REGION): { "DeviceName": "/dev/sda1", "Ebs": { - 'VolumeType': 'io2', - 'Iops': 16000, + # "VolumeInitializationRate": 300 + "VolumeSize": 30, # Size in GB + "VolumeType": "gp3", # General Purpose SSD + "Throughput": 1000, + "Iops": 4000 # Adjust IOPS as needed } } ] diff --git a/desktop_env/providers/aws/provider.py b/desktop_env/providers/aws/provider.py index 284ef2a..d2c034e 100644 --- a/desktop_env/providers/aws/provider.py +++ b/desktop_env/providers/aws/provider.py @@ -133,8 +133,11 @@ class AWSProvider(Provider): { "DeviceName": "/dev/sda1", "Ebs": { - 'VolumeType': 'io2', - 'Iops': 16000, + # "VolumeInitializationRate": 300 + "VolumeSize": 30, # Size in GB + "VolumeType": "gp3", # General Purpose SSD + "Throughput": 1000, + "Iops": 4000 # Adjust IOPS as needed } } ]