New CPU Load Balancer from MIT

The Shenango system is planned for use in data centers.

New CPU Load Balancer from MIT
/ фото Marco Verch CC BY

According to one provider, data centers use only 20–40% of available computing power. Under high load conditions, this figure can reach 60%. Such resource distribution leads to the emergence of so-called “zombie servers.” These are machines that remain idle most of the time, wasting electricity. Today, 30% of servers worldwide are idle, consuming electricity worth $30 billion a year.

To combat the inefficient use of computing resources, MIT decided to take action.

A team of engineers developed a CPU load balancing system called Shenango. Its goal is to monitor the state of the task buffer and redistributing “stuck” processes (that cannot get CPU time) to free machines.

How Shenango Works

Shenango is a Linux library written in C with bindings for Rust and C++. The project's code and test applications are published in the repository on GitHub.

The core of the solution is the IOKernel algorithm, which runs on a dedicated core of a multiprocessor system. It manages CPU requests via the DPDK, which allows applications to interact directly with network devices.

IOKernel decides which cores to assign a specific task. The algorithm also determines how many cores are necessary. For each process, primary (guaranteed) and additional (burstable) cores are designated — the latter are activated during sharp increases in CPU requests.

The IOKernel request queue is organized as a circular buffer. Every five microseconds, the algorithm checks whether all tasks assigned to the core have been completed. It does this by comparing the current location of the buffer's “head” with the previous position of its “tail.” If it turns out that the tail was already in the queue during the last check, the system flags a buffer overload and allocates an additional core for the process.

When distributing the load, priority is given to cores where such processes were executed previously and partially remain in the cache, or any idle cores.

New CPU Load Balancer from MIT

Shenango additionally uses a work stealing approachCores dedicated to a single application monitor the number of tasks among each other. If one core finishes its task list earlier than the others, it "takes off" some of the load from its neighbors.

Advantages and Disadvantages

According to words Engineers from MIT, Shenango can process five million requests per second and maintain an average response time of 37 microseconds. Experts say that in some cases, the technology can increase CPU utilization rates in data centers to 100%. As a result, data center operators can save on purchasing and maintaining servers.

Solution Potential note and specialists from other universities. According to a professor from a Korean institute, the system from MIT will help reduce latency in web service operations. For example, it will be useful for online shops. During sales days, even a second delay in page loading leads to an 11% decrease in website views. Prompt load distribution will help serve more customers.

The technology still has drawbacks — it does not support multiprocessor NUMA-systems, where chips are connected to different memory modules and do not "communicate" with each other. In this case, IOKernel can regulate the work of a separate group of processors, but not all chips of the server.

New CPU Load Balancer from MIT
/ фото Tim Reckmann CC BY

Similar technologies

Among other processor load balancing systems, Arachne stands out. It calculates how many cores an application will need at the moment of its launch and distributes processes accordingly. According to the authors, the maximum delay in application performance in Arachne is about 10,000 microseconds.

The technology is implemented as a C++ library for Linux, and its source code is available at GitHub.

Another load balancer tool is ZygOS. Like Shenango, the technology uses the work stealing method for process redistribution. According to the authors of ZygOS, the average delay in application performance when using the tool is about 150 microseconds, and the maximum is about 450 microseconds. The project's code is also available in open access.

Conclusions

Modern data centers continue to expand, especially the trend towards growth is noticeable in the hyperscale data center market: there are currently exists in the world. 430 hyperscale data centers, but their number could increase by 30% in the coming years. For this reason, processor load balancing technologies will be in high demand. Systems like Shenango are already being implemented by large corporations, and the number of such tools will only continue to grow in the future.

Posts from the First Blog about Corporate IaaS:

Source: habr.com

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster