Setting the CPU cores and threads per CPU core for a DB instance class
You can configure the number of CPU cores and threads per core for the DB instance class when you perform the following operations:
Note
When you modify a DB instance to configure the number of CPU cores or threads per core, there is a brief outage similar to when you modify the instance class.
Set the CPU cores by using the AWS Management Console, the AWS CLI
The Optimize CPU settings are the ProcessorFeature values coreCount and threadsPerCore. The processor feature values are null if Optimize CPU is not configured.
To set the processor features when you create a DB instance
Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/
. Choose Create database.
When setting the Instance configuration options:
Under Optimize CPU, select Configure the number of vCPUs.
Under vCPUs, choose the number of thread(s) per CPU core and the number of core(s). The lists show the valid values for the selected instance class. For more information, see DB instance classes that support Optimize CPU.
-
After completing other selections, choose Create database.
To view the processor features of a DB instance
Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/
. In the navigation pane, choose Databases, and then choose the DB instance.
Choose the Configuration tab.
Under Processor Features, view the vCPU, Core count, and Threads per core values.
To modify the processor features of a DB instance
Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/
. In the navigation pane, choose Databases, and then choose the DB instance that you want to modify.
Choose Modify.
For Optimize CPU, choose Configure the number of vCPUs.
Under vCPUs, choose the number of thread(s) per CPU core and the number of core(s). The lists show the valid values for the selected instance class. For more information, see DB instance classes that support Optimize CPU.
Choose Continue.
For When to apply modifications, choose Apply during the next scheduled maintenance window or Apply immediately.
Choose Modify DB instance.
To return a DB instance to the default processor features
Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/
. In the navigation pane, choose Databases, and then choose the DB instance that you want to modify.
Choose Modify.
For Optimize CPU, choose Use default vCPUs.
Choose Continue.
For When to apply modifications, choose Apply during the next scheduled maintenance window or Apply immediately.
Choose Modify DB instance.
To set the processor features when you create a DB instance
To configure Optimize CPU using the AWS CLI, include the
--processor-featuresoption in the create-db-instance command. Specify the number of CPU cores with thecoreCountandthreadsPerCoreas1.Use the following syntax:
aws rds create-db-instance \ --db-instance-identifiermy-rds-instance\ --engine sqlserver-ee \ --engine-version 17.00 \ --license-model license-included \ --db-instance-class db.r8i.8xlarge \ --allocated-storage 300 \ --master-usernameadmin\ --manage-master-user-password \ --no-multi-az \ --vpc-security-group-idssg-0123456789abcdef0\ --db-subnet-group-namemydbsubnetgroup\ --processor-features "Name=coreCount,Value=12" "Name=threadsPerCore,Value=1"
Example of viewing valid processor features for a DB instance class
Use the describe-orderable-db-instance-options command to show the default and allowed values.
aws rds describe-orderable-db-instance-options \ --engine sqlserver-ee \ --db-instance-class db.r8i.8xlarge \ --query "OrderableDBInstanceOptions[0].AvailableProcessorFeatures"
In addition, you can run the following commands for DB instance class processor information:
-
describe-db-instances – Shows the processor information for the specified DB instance
-
describe-db-snapshots – Shows the processor information for the specified DB snapshot
-
describe-valid-db-instance-modifications – Shows the valid modifications to the processor for the specified DB instance
Example of setting the number of CPU cores for a DB instance
The following example uses the modify-db-instance command to modify my-rds-instance by setting the
number of CPU cores to 12 and threadsPerCore to 1. Apply the changes immediately by using --apply-immediately.
If you want to apply the changes during the next scheduled maintenance window, omit the --apply-immediately option.
aws rds modify-db-instance \ --db-instance-identifiermy-rds-instance\ --processor-features "Name=coreCount,Value=12" "Name=threadsPerCore,Value=1" \ --apply-immediately
Example of returning to default processor features for a DB instance
The following example uses the modify-db-instance command to modify my-rds-instance by returning it to the default processor features.
aws rds modify-db-instance \ --db-instance-identifiermy-rds-instance\ --use-default-processor-features \ --apply-immediately
To set the processor features when you create a DB instance
To configure Optimize CPU using AWS Tools for PowerShell, include the
-ProcessorFeatureparameter in the New-RDSDBInstance cmdlet. Specify the number of CPU cores with thecoreCountandthreadsPerCoreas1.Use the following syntax:
New-RDSDBInstance ` -DBInstanceIdentifiermy-rds-instance` -Engine sqlserver-ee ` -EngineVersion 17.00 ` -LicenseModel license-included ` -DBInstanceClass db.r8i.8xlarge ` -AllocatedStorage 300 ` -MasterUsernameadmin` -ManageMasterUserPassword $true ` -MultiAZ $false ` -VpcSecurityGroupIdsg-0123456789abcdef0` -DBSubnetGroupNamemydbsubnetgroup` -ProcessorFeature @{Name='coreCount';Value='12'},@{Name='threadsPerCore';Value='1'}
Example of viewing valid processor features for a DB instance class
Use the Get-RDSOrderableDBInstanceOption cmdlet to show the default and allowed values.
Get-RDSOrderableDBInstanceOption ` -Engine sqlserver-ee ` -DBInstanceClass db.r8i.8xlarge | Select-Object -First 1 -ExpandProperty AvailableProcessorFeatures
In addition, you can run the following cmdlets for DB instance class processor information:
-
Get-RDSDBInstance – Shows the processor information for the specified DB instance
-
Get-RDSDBSnapshot – Shows the processor information for the specified DB snapshot
-
Get-RDSValidDBInstanceModification – Shows the valid modifications to the processor for the specified DB instance
Example of setting the number of CPU cores for a DB instance
The following example uses AWS Tools for PowerShell and the Edit-RDSDBInstance cmdlet to modify my-rds-instance by setting the
number of CPU cores to 12 and threadsPerCore to 1. If you want to apply the changes during the next scheduled maintenance window, omit the -ApplyImmediately parameter.
Edit-RDSDBInstance ` -DBInstanceIdentifiermy-rds-instance` -ProcessorFeature @{Name='coreCount';Value='12'},@{Name='threadsPerCore';Value='1'} ` -ApplyImmediately $true
Example of returning to default processor features for a DB instance
The following example uses AWS Tools for PowerShell and the Edit-RDSDBInstance cmdlet to modify my-rds-instance by returning it to the default processor features.
Edit-RDSDBInstance ` -DBInstanceIdentifiermy-rds-instance` -UseDefaultProcessorFeature $true ` -ApplyImmediately $true