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

[chore] Reduce vCPU count requirements on instances #7

Open
jplock opened this issue Aug 2, 2024 · 1 comment
Open

[chore] Reduce vCPU count requirements on instances #7

jplock opened this issue Aug 2, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@jplock
Copy link
Contributor

jplock commented Aug 2, 2024

We are asking to reserve 6 CPUs for nitro enclaves at https://github.com/aws-samples/sample-code-for-a-secure-vault-using-aws-nitro-enclaves/blob/main/vault_template.yml#L250

ACM for Nitro Enclaves requires 2 vCPUs to operate, 1 vCPU is required for the parent instance, leaving 1 vCPU available for the enclave application.

When launching a parent instance, choose an instance type that has enough vCPUs and memory for both the parent instance and the additional enclaves. If multi-threading is enabled, you must leave at least 2 vCPUs for the parent instance. If multi-threading is not enabled, you must leave at least 1 vCPU for the parent instance. For example, if multi-threading is enabled and you intend to run 4 enclaves with 4 vCPUs each, you must select an instance type that has at least 18 vCPUs (2 for the parent instance and 16 for the enclaves).
source

We should be able to reduce the minimum CPU count in the launch template from 8 to 4.

https://github.com/aws-samples/sample-code-for-a-secure-vault-using-aws-nitro-enclaves/blob/main/vault_template.yml#L634

@jplock jplock self-assigned this Aug 2, 2024
@jplock jplock added the enhancement New feature or request label Aug 2, 2024
@jplock
Copy link
Contributor Author

jplock commented Oct 16, 2024

I thought I could use the CoreCount and ThreadsPerCore properties in https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-cpuoptions.html to disable multi-threading so we could support 4 vCPU machines (1 vCPU for parent, 2 vCPUs for Nitro ACM, 1 vCPU for Nitro Vault), but it became too complicated aligning to instance types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant