Cloud Container Performance: The Conundrum of Swap

.
/
Date

We're constantly pursuing better performance and increased stability in our products, find out what's next on this journey for Cloud Containers.

.

It’s been over three years since we launched Cloud Containers, which was one of our most ambitious projects ever. Thankfully both new and existing customers alike embraced the platform and it’s still continuing to grow today, which allows us to continue improving it.

This growth does bring new challenges with it though and it’s important that we tackle these head on. Our current focus being the stability and performance of our Cloud Container hardware nodes (and thus your servers) as the sheer number of servers continue to increase.

To that end we’re reviewing many aspects of the product, including (but not limited to) our guidelines around the number of containers per server, CPU usage, tuning and optimisation as well as our own hardware. But we’re starting with something that we have had our eye on for a long time; swap.

What is swap and why does it matter?

Swap can come in a few different shapes and sizes, but ultimately it allows Linux to move information out of memory (RAM) and into a file or partition on the storage disk, which in turn frees up the memory for other uses. This makes sense because generally RAM is a much scarcer resource while usually there’s plenty of storage to go around.

The downside of swap living on a disk is that it’s much slower than RAM, even with solid-state drives (SSD) it’s tens of thousands of times slower.

In a healthy environment swap is barely used, but when it is information moving in or out should be rare. Instead what we see on our Cloud Container platform is a small percentage of customers making heavy use of swap, probably unknowingly, to the detriment of their own performance and stability. In some severe cases it can also have a negative impact on other servers on the same node. I’m sure we all agree this is a problem.

The stability and performance of our products and the resulting customer experience is something we are never prepared to compromise on.

What is the solution?

This is one of those rare occasions where the solution is simple. Over the coming weeks we plan to turn off swap on our Cloud Container platform, which once the dust has settled will result in a more stable and more performant platform for everyone. However, those servers that are currently relying on swap will need more memory – otherwise they will crash since swap will no longer be available as a crutch to keep them online.

The downside is that more memory costs money, which will result in plan and therefore price increase for those customers. Before we make this change we will be reaching out to people who we think are most likely to be impacted by this change to discuss options moving forward.

Finally, it’s worth saying that this isn’t a change we’re taking lightly, evidenced by the fact that we've been considering it for over a year. We take pride in offering what we think is exceptional value to our customers and forcing an increase in someones monthly bill is something we try to avoid. But ultimately the stability and performance of our products and the resulting customer experience is something we are never prepared to compromise on – plus in the end who doesn’t want faster, more reliable hosting? I know we do.