Issue
I'm using spot instance that are spun up from template in the Ohio region. When I choose c5a.large, c5a.xlarge, c5a.2xlarge, c5a.4xlarge and run the following commands -
cat /proc/cpuinfo | grep processor | wc -l
nproc
I see 2,4, 6, 8 &16 vcpus in the output as expected & as mentioned in the tabulation below. The allocated memory also matches.
However when I choose any of c5a.8xlarge, c5a.12xlarge or c5a.16xlarge, the memory allocated matches the tabulation below while the vcpu count remains at 16 in all the 3 cases.
The vcpu limit for spot instance is currently at 6. So, it's not a vcpu limit problem.
Screenshot of VCPU limits calculator
Output from m5a.8xlarge box
The limits as they apply to spot
Solution
Although there was just one instance running at the point in time I was starting up this instance, AWS saw multiple instances running for some reason. This accounted to vCPU being distributed across all the instances running & hence the total allocated vcpu limit to me was reached according to AWS support. This has been resolved since.
Answered By - usert4jju7