Limiting the number of CPU cores available to EC2 instances may be helpful for reducing the number of Oracle licenses. This feature allows reducing only the CPU cores while keeping the same amount of memory, same storage throughput, and same network bandwidth.
Note: Careful planning is required when limiting the number of CPU cores. CPU options can only be specified during instance launch and cannot be modified after launch. When you change the instance type of an existing instance, the CPU options automatically change to the default CPU options for the new instance type.
To configure reduced number of CPU cores when launching a FlashGrid Cluster, in the cluster configuration file manually add the following attributes for the corresponding database nodes in the instances parameter before deployment:
- 'core_count': <number of cores>
- 'threads_per_core': 2
Note: Both attributes must be specified. EC2 also allows reducing the number of threads per core from 2 to 1. However, this should not have any impact on licensing and is not recommended.
Example of a customized instances parameter:
instances = [{'az': 'a', 'ins_type': 'r5.8xlarge', 'name': 'rac1', 'role': 'database', 'core_count': 6, 'threads_per_core': 2},
{'az': 'b', 'ins_type': 'r5.8xlarge', 'name': 'rac2', 'role': 'database', 'core_count': 6, 'threads_per_core': 2},
{'az': 'c', 'ins_type': 'c5.large', 'name': 'racq', 'role': 'quorum'}]
References:
Rules for specifying CPU options
CPU cores and threads per CPU core per instance type