Container Resources Configuration
Shares are the units we use to describe compute usage. A full share is 10 and equates to a single virtualized core or thread. To calculate shares available, multiply the amount of virtual cores or the amount of threads available on the infrastructure by 10.
By default, Cycle will set CPU limit to 2 shares. That limit is then added to the total used shares on a server. This includes service containers as well. If the total shares available are exceeded on the infrastructure, Cycle will no longer allow the deployment of instances to that infrastructure.
- Limits are the maximum amount of resource that can be used.
- Reserve is the amount each instance of a container should pre-allocate of the given resource.
- Units are kilobytes(KB), megabytes(MB), gigabytes(GB), and so on.
- Cycle supports pinning instances to specific threads or ranges of threads.
Threads are synonymous with vCPU cores in almost all cases.
Bare Metal and Virtualization Differences
CPU Shares
Bare metal servers come with access to non-virtualized cores. Bare metal servers that support hyperthreading, will have 2 threads per core. This equates to 20 shares per core or 10 shares per thread.
A VM with virtualized cores will have 10 shares per virtualized core, as a virtualized core is almost always synonymous to a thread on the underlying server.
Pinning
Bare metal servers that support hyperthreading have 2 threads per core. In container configuration, pinning is expressed as threads or virtualized cores. For a hyperthreaded bare metal core, use the thread range 0-n, where n is the total number of threads on that core minus 1.
Example:
- 0 for specifically the first thread
- 1 for specifically the second thread
- 0-11 for the first 12 threads
- 1-3 for the 2nd through 4th thread
- 2-x for all threads except the first
Learn more about managing container resources.
CPU
| Field | Description |
|---|---|
| Enable Shares | Option to enable CPU shares for allocation of CPU resources. |
| Enable Pinning | Option to pin processes to specific CPU cores. |
| Limit | Specify the maximum CPU limit for the container or process. |
| Reserve | Specify the reserved CPU capacity. |
| Cores | Set specific CPU cores in the format "4" or "4-6". |
RAM
| Field | Description |
|---|---|
| Enable Limit | Option to enable limiting RAM usage. |
| Enable Reserve | Option to reserve a specific amount of RAM. |
| Limit | Specify the maximum amount of RAM that can be used. |
| Reserve | Specify the amount of RAM to reserve. |
Viewing Charts in Portal
Container instance scoped charts show a different percent usage than a server level chart. This is normal.
The server chart is showing the total CPU used on a given server as a percent, while the individual instance is showing the percent used of the CPU it has access to. Check out this guide for more information.