acf domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php on line 6131all-in-one-wp-migration domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php on line 6131rocket domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php on line 6131Containers are by no means a new thing at this point. However, their popularity is certainly not declining thanks to the convenience and ease of use they offer. Just about any app can be containerized for quick scalability but are you compromising on something when doing so? What should you expect for container performance due to the additional virtualization layer? The only way to find out is to test it yourself!<\/p>\n
While it’s easy to compare providers on simple benchmark results, getting a more in-depth look into the cost and performance metrics takes a bit more effort. Throw containers into the mix and you have quite the equation to balance out. Therefore, to get a better understanding of the costs and benefits of containers, we decided to put some container configurations through their paces.<\/p>\n
Test hosting on UpCloud!<\/a><\/p>\n The move towards cloud infrastructure has been long supported in part by the savings offered by competitive pricing and reduced administrative overhead. Users can achieve further cost reductions by making efficient use of their resources and containers can provide a convenient method for fully utilising cloud servers. But too much of any good thing can be to the detriment of its benefits.<\/p>\n One of the main selling points of containers is the ability to isolate the applications running in separate containers without adding too much in the way of overhead. However, it’s a commonly held belief that containers impose performance costs. Due to the extra layer of virtualization, containerized applications might not achieve quite the same performance as those running natively on the OS.\u00a0This was still the case some years ago<\/a>\u00a0but technology has come a long way since.<\/p>\n As self-hosting server hardware is becoming rarer, containers more often run on top of already virtualized systems such as cloud servers. While each cloud server runs a full guest operating system, containers share the same kernel between themselves and the cloud host. Then again, thanks to the flexibility of the cloud, you can easily deploy any number of cloud servers with varying configuration.<\/p>\n The question then turns to the balance between the numbers of individual cloud servers and hosted containers. Although the final infrastructure from a single container’s\u00a0the point of view might be mostly the same, the application scalability and performance can differ. Therefore, it becomes ever more important to validate the optimal number of containers per cloud server resources.<\/p>\n It would be a simple task to just deploy the largest configuration available and test how many containers you can stuff into it. However, the number of resources a single container can utilise will depend largely on the containerized application. That is why, instead of attempting to simulate a real-world use case, we decided to fully stress the servers by running a varying number of concurrent CPU benchmarks within Docker containers.<\/p>\n To save time and manual work, the cloud servers were deployed using Terraform to create a clean environment for each run. Then as we needed to be able to quantify the container performance objectively, we selected to use Sysbench to run CPU benchmarks. Although Sysbench does not offer a ready-made container, it was a simple task of building one using the latest Ubuntu container along with the appropriate packages.\u00a0Each server was also benchmarked running Sysbench natively on the OS to create a baseline.<\/p>\n The results speak well for the performance improvement attained by containerized application. Containers were able to reach performance numbers within the margin of error of the uncontainerized natively run baseline. Below you can see example performance numbers per container per number of containers on UpCloud. The number of threads per container was adjusted according to the total number of containers to fully utilise each server configuration, oversubscribing where necessary.<\/p>\n <\/p>\nContainers in the cloud<\/h2>\n
Testing the theory<\/h2>\n