Go back

Optimal hypervisor configuration for deploying TrueConf solutions

October 15, 2024
Alexey Arkatov

Alexey Arkatov

This article will show how the settings of dedicated virtualization resources affect the performance of a video conferencing server. We will also offer recommendations for the optimal hypervisor configurations to be used with TrueConf Server.

Dedicated virtualization resources

Dedicated resources are the resources of the host machine (or cluster) that are not redistributed between processes. The positive side of this approach is the stability of processes created by the solutions deployed on the host since all processes are executed to the end. However, if you do not configure the use of dedicated resources properly, the execution of these processes may be unstable.

Dedicated resources are all the resources that a host can allocate to the execution of processes created by the solutions deployed on this machine. They include:

  • Virtual CPU threads (vCPU);
  • Virtual RAM (vRAM);
  • Virtual hard drives.

In summary, dedicated resource mode is a hypervisor configuration where the total amount of virtual resources does not exceed the amount of physical resources.

Parameters affecting the use of host machine hardware resources

vCPU overcommitment is a parameter that allows allocating more vCPUs to virtual machines than are available on a physical server. The overcommitment coefficient is the ratio of the total number of virtual threads (vCPUs) to the number of the physical threads available on the cluster. To calculate this ratio, divide the number of allocated virtual threads by the number of cluster threads (vCPU/pCPU). This solution is applicable if virtual machines do not use 100% of their resources most of the time which ensures that the server load is not critical.

To get a better idea of how this parameter works, let us consider the case when each user in a company works on a virtual machine. There is a group of users characterized by low use of virtual machine resources; they almost never use their virtual machines at full capacity. In this case the overcommitment ratio can be set to more than 1. The optimal value can be configured through testing.

Now let us consider the opposite situation when a group of people uses 100% of available resources for a rather long time. In this case one has to set the overcommitment ratio to 1 to ensure the stability of both the virtual machines and the cluster as a whole.

We do not recommend using vCPU overcommitment when deploying TrueConf Server (in other words, the ratio should equal 1). This approach will maximize cluster performance and have a positive effect on the quality and stability of video conferencing.

Live migration is a mechanism for moving a virtual machine from one physical server to another. During this process, the virtual machine, which is being migrated, does not interrupt its operations and the state of this machine is fully preserved. After migration the virtual machine continues its operation as if nothing had happened.

If you use TrueConf Server, live migration should be disabled due to the likelihood of failure when transferring resources from one physical server to another.

Background process schedule is a parameter for controlling the execution of all background processes: frequency and repetition of execution, trigger conditions, and actions executed upon triggering.

In this article, we recommend using a dedicated virtual machine for TrueConf Server to maximize its stability. With this approach, there is no need for additional cluster configuration to optimize process performance. Besides, this method ensures the best performance and stability of the virtual machine where TrueConf Server is installed.

MTU (Maximum Translation Unit) is the maximum size of the data packet being transmitted. An MTU value of 1500 bytes is optimal in most cases because it ensures that the delivery time of each data block is not critical while maintaining a high data transfer rate through the network interface. Proper configuration of this parameter helps minimize data packet loss during video conferencing.

In some cases, it may be necessary to set a specific MTU value, for example, according to the settings of your network equipment. So, we cannot recommend a value that will fit all possible cases. For more details, refer to the guide for your equipment.

Traffic marking is a parameter that allows tracking incoming and outgoing traffic which increases network security. Unwanted traffic is discarded or limited according to certain rules. This method enables traffic optimization by setting priorities. For example, video conferencing or IP telephony requires higher service speeds compared to sending emails or browsing web pages.

All the parameters discussed above have an effect on video conferencing: video and sound quality, frame rate, etc. We will discuss their configuration to optimize TrueConf Server performance on popular hypervisors.

Configuration of resources on popular hypervisors

vCPU overcommitment

KVM

In the KVM hypervisor vCPU overcommitment operates automatically. If the total number of vCPUs for all virtual machines exceeds the total number of host machine threads, a warning about overcommitment and potential performance degradation will be displayed. So, vCPU overcommitment can be prevented only by manually controlling the distribution of virtual threads. Here, one has to ensure that the overcommitment ratio does not exceed 1.

When you create a new virtual machine or configure an existing one, the number of virtual threads may accidentally exceed the number of physical ones. So, one has to be careful when setting up virtual machines to avoid failures.

To create a virtual machine, use the virt-install command with a set of parameters that may vary depending on each case. Here is an example of a simple command to create a virtual machine:

We will discuss the --vcpus parameter. If the value exceeds the number of host threads, a warning is displayed in the terminal:

To change the parameters of the virtual machines that have already been created, edit their configuration file stored in the directory /etc/libvirt/qemu/. To open the file, execute the following command:

where
[vmname] — the name of the virtual machine.

Find the following line in the file:

<vcpu placement='static'>N</vcpu>

where
N — the number of virtual threads.

Change the value of N and save the file. This is how a part of the configuration file looks like:

Please note that no warnings will be displayed if you change the parameters of the virtual machine that has already been configured.

Xen

In the case of the Xen hypervisor, vCPU overcommitment is disabled by default due to activated protection. If you try to start a virtual machine with vCPU overcommitment while protection is still on, the machine simply will not start, and a pop-up window with an error message will be displayed (if Xen is used with a GUI):

or an error message will be displayed in the terminal (if Xen is used without a GUI):

If protection against vCPU overcommitment is disabled, this feature works similarly to the KVM hypervisor: if the total number of vCPUs exceeds the total number of pCPUs on the host machine (cluster), a warning about overcommitment and possible performance degradation will be displayed.

VMware ESXi

By default, vCPU overcommitment is disabled, but you may need to check the overcommitment settings of the clusters that are already running. To do it, you need to enable VMware Distributed Resource Scheduler (DRS):

  1. Open a web browser and log in to VMware vSphere Client.
  2. Click on Hosts and Clusters in the navigation panel to open the list of clusters and hosts.
  3. Right-click on the name of the cluster, and select Settings in the context menu.
  4. In the panel that opens at the top, go to the Configure tab, and navigate to Service → vSphere DRS.
  5. Click EDIT at the end of the line vSphere DRS is Turned OFF.
  6. Toggle the vSphere DRS switch in the Edit Cluster Settings pop-up.

Without leaving the Edit Cluster Settings window, go to the Additional Options tab and activate the Enabled parameter in the CPU Over-Commitment section. To disable overcommitment, set the Over-commitment ratio to 1.

VirtualBox

In the VirtualBox hypervisor, everything is similar to KVM: vCPU overcommitment works automatically. If the number of vCPUs across all virtual machines exceeds the number of physical threads in the cluster, a warning about overcommitment and potential performance degradation will be displayed. vCPU adjustment is done manually.

Hyper-V

The interface of the Microsoft Hyper-V hypervisor has a separate tab for configuring vCPU and vRAM.

To disable overcommitment, go to the virtual machine settings. In the Hardware tab, double-click on the Processor option (or click the + button next to the Processor option), navigate to the NUMA section, and click the Use hardware topology button. The parameters for the maximum allocation of vCPUs and vRAM will take the value of the cluster and cannot exceed it.

MTU

Windows

To configure the MTU parameter on Windows, you need to execute several commands. First, you should check the current value by running the command:

Next, change the value according to your needs by executing the following command:

where:

  • [network interface] — the name of the network interface;
  • [value] — the MTU value in bytes.

Here is an example of the command that changes the MTU value to 1350 bytes:

Linux

To change the MTU parameter, you need to edit the file dhclient.conf in the directory /etc/dhcp/. To edit this file, use the following command:

Now, you need to add the following text right after the line send host-name = gethostname ();

where:

[value] — the value of the MTU parameter in bytes.

These changes will affect all system network interfaces, but if you need to change the MTU value only for some network interfaces, add the following text:

where:

  • [network interface] — the name of the network interface;
  • [value] — the MTU value in bytes.

The following is the example of a text for changing the MTU value to 1350 bytes for the enp1s0 interface:

After making changes, save and close the file. To apply the values, restart the network service with the command:

Run this command to check your changes:

One should also consider the case when the network is configured with netplan. To change the parameter, you need to edit the .yaml configuration file in the /etc/netplan/ directory. There may be multiple configuration files, but by default, there is only one file named 01-network-manager-all.yaml. You can create your own .yaml file with a new name and network settings. Example of the source file:

In this case, we will change the MTU parameter of the enp1s0 network interface. To do it, just add the following text under the interface name:

In this case, the MTU parameter of the enp1s0 interface will be changed to 1350. The final text of the configuration file is as follows:

To apply changes, run these commands:

To verify the changes, execute:

Traffic marking

Windows

Traffic marking on Windows is controlled with the “QoS Packet Scheduler” component. To mark packets, enable the packet scheduler and set the marking rules.

  1. Check if QoS Packet Scheduler is enabled in the network interface properties.
  2. If it is not enabled, you need to create a new branch HKLM\SYSTEM\CurrentControlSet\services\Tcpip\QoS in the Windows registry with the string parameter Do not use NLA set to 1.

Traffic prioritization is configured in TrueConf Server for Windows by default. Just enable the packet scheduler as described above. You can find more details on configuring QoS for Windows in our article.

Linux

On Linux, traffic marking for TrueConf Server is done by changing the following parameters:

  1. QoS TC Stream Value — signaling traffic;
  2. QoS TC Transport Value — media traffic.

You need to change these parameters in the server configuration with the tc_regkey tool.

First, run the following command to check if any changes in traffic marking have already been made in the configuration:

Two possible results may be displayed in the terminal:

  1. Empty, indicating that no changes have been made to the traffic marking configuration.
  2. If any changes have been made to the configuration, the result will be as follows:
    ,QoS TC Stream Value, i32, 7

where:

  • QoS TC Stream Value — parameter name;
  • i32 — data type;
  • 7 — current value.

Before making changes, stop the server service with the command:

For example, by default, TrueConf Server uses the value 40 for marking media traffic. To set a different value, run the command:

where:

  • QoS TC Stream Value — the name of the parameter, in this case, it is media traffic;
  • i32 — data type;
  • 50 — new value of traffic priority.
    • If you need to configure the parameter responsible for marking signaling traffic, the steps are similar; just replace QoS TC Stream Value with QoS TC Transport Value.

      After making changes, restart the service with the command:

      Run this command to check your changes:


Still have questions? Please contact our support team directly via online chat.

Sign up for newsletter