Acorn comes with a number of features that allow you define how your application workloads will be scheduled at deploy-time.
You can configure Acorn apps to have a set memory upon startup.
This allows you to specify memory that an Acorn will abide by when being created. There are a number of ways to set this so that you have full control over defaults, workloads, and maximums. In order of precedence, the ways to set memory are when you:
When installing Acorn, you can also specify
--workload-memory-maximum. This flag sets a maximum that when exceeded prevents the offending Acorn from being installed.
Valid memory values
Supported value formats for memory flags include
- 1_234 ->
- 5M ->
- 1.5Gi ->
- 0x1000_0000 ->
These all translate into an exact amount of bytes. We encourage you use the binary representation of large quantities of bytes when interacting with memory such as
It is possible to set any of these flags to have no limit on memory by simply setting their value to
0. However, running an Acorn with its memory set to
0 while the
--workload-memory-maximum is not set to
0 will roughly translate to "use as much memory as allowed". For example, say that we install Acorn with a non-zero
acorn install --workload-memory-maximum 512Mi
Then we try to run an Acorn with its memory set to 0.
acorn run --memory 0 foo
foo Acorn gets provisioned, all of its containers will have their memory set to
--workload-memory-maximum we set prior).
This same interaction will occur if the
--workload-memory-default is set to 0 (which it is by default)
You can configure Acorn apps to have a set compute class upon startup.
Setting a compute class allows you to define what the infrastructure providing your Acorn workloads should look like. Things that compute classes control include:
- What OS/Architecure your workloads will run on
- How much memory is minimal, maximal, default and allowed
- How many vCPUs should be allocated
You are not able to set vCPUs directly. This is an intentional abstraction and instead vCPUs are calculated based on of the amount of memory specified for a workload.
Using a Compute Class
You can see the compute classes available in your current project using the CLI.
$ acorn offerings computeclasses
NAME DEFAULT MEMORY RANGE MEMORT DEFAULT DESCRIPTION
default * 512Mi-1Gi 1Gi Default ComputeClass
non-default 0-1Gi 512Mi Non-default ComputeClass
unrestricted Unrestricted 512Mi Unrestricted ComputeClass
specific 128Mi,512Mi,1Gi 128Mi Specific ComputeClass
Breaking this down:
DEFAULTindicates whether a ComputeClass is the default and will be used if no ComputeClass is defined.
MEMORY_DEFAULTindicates the memory that will be requested for a workload if none is specified.
MEMORY_RANGEindicates what memory values are available to use, and can take two forms.
-denotes a range and any value within it can be specified.
,denotes specific values that are the only ones allowed.
Specifying compute classes can be done in the Acornfile (using the class property for containers) or at runtime (using the --compute-class flag). If you do not specify a compute class, the default compute class for the project will be used. If there is no default for the project, the default for the cluster will be used. Finally, if there is no cluster default then no compute class will be used. Depending on the compute class that is used, the memory that you specify may be in contention with its requirements. Should that happen Acorn will provide a descriptive error message to ammend any issues.
Looking to manage a compute class? This should only be done if you are (or are in communication with) an administrator of Acorn. You can read more information about managing compute classes here