This section gives general guidelines for resource allocation for cOS Stream virtual machines for both VMware and KVM. Hypervisor specific guidelines can be found in the setup sections for VMware and KVM.
Minimum Memory and Disk Requirements
All hypervisor image files supplied by Clavister have a predefined RAM memory allocation of 1024 Mbytes. This is the minimum amount of memory required for cOS Stream to run and it should never be reduced. This default allocation may need to be increased depending on the license purchased and the number of connections/tunnels that will be open simultaneously. There is no higher memory limit.If the allocated memory is insufficient during operation, cOS Stream will output console messages indicating this while trying to reduce the number of open connections/tunnels. Eventually, the system will enter safe mode where only management access is possible.
The minimum disk space allocated should be 1 GByte.
Overview of Memory and CPU Core Allocation
By default, cOS Stream will automatically distribute the allocated memory for the control and data planes in a virtual instance. To do this, it uses an algorithm that assigns the majority of the memory to the data plane since this is where the memory is most likely needed to handle flows and other state information that will grow with the amount of throughput. However, in some situations it may be required to change the memory distribution. This can be done by changing the ControlPlaneMemory system setting to the amount of megabytes that should be assigned to the control plane. The remaining memory will be assigned to the data plane. The system must be restarted for the change to take effect.By default, cOS Stream will also automatically distribute the allocated CPU core resources for the control and data planes by using an algorithm that assigns the majority of CPU cores to the data plane since, in most cases, this plane is handling the majority of traffic. However, in some situations, it may be required to change the CPU core allocation and allocate more cores to the control plane. This can be done by configuring the ControlPlaneCPUCores system setting to be the number of cores to allocate to the control plane. The remaining cores will be assigned to the data plane. The system must be restarted for the changed setting to take effect.
Allocating Sockets, Cores and Threads to a Virtual Machine
The following guidelines should be noted when allocating CPU sockets, cores and threads to the virtual machine running cOS Stream:Allocating CPU Sockets
cOS Stream only supports running on a single socket. Running on multiple sockets is possible but will degrade performance.
If multiple sockets are configured, cOS Stream will assign its data plane to run on one of the sockets and the control plane will run on the reminder. This then makes it impossible to redistribute CPU resources, either automatically (so the data plane gets most of the resources), or using the cOS Stream configuration setting ControlPlaneCPUCores.
Allocating CPU Cores
It is recommended to assign at least two CPU cores to cOS Stream (although it is possible to run cOS Stream on a single core). Having at least two allows the control plane and data plane to run on separate cores. If higher performance is required, more than two cores can be assigned and the data plane will make use of the additional cores.
Allocating Core Threads
cOS Stream supports one or two threads per core. These are sometimes referred to as hyper-threads or logical cores. However, there is no requirement to use multiple threads since cOS Stream performance is equally good if resources are allocated in the form of CPU cores.
If the underlying hardware has hyper-threading, some optimization of performance is possible if the CPU topology, including threads, is correctly exposed to the virtual machine. However, there is only a gain if the virtual thread pairs match actual hardware thread pairs. Without a match, performance can be degraded instead of improved. When in doubt, it is better to expose all hyper-threads as separate CPU cores rather than exposing them as incorrectly mapped threads.
As a final comment, if cOS Stream is presented with more than two threads per core (meaning an incorrect setup as no CPU has more than two threads per core) then this will give the same result as a multi-socket system. In other words, the data plane will be assigned to run on only one of them and the control plane will run on the remaining.