Scale 1k: an OpenStack cloud with 1,000 compute nodes

Scale 1k was an internal Mirantis R&D project to run one OpenStack cloud with 1,000 compute nodes on a single virtual control plane. I led the project. It was one of only two such clouds ever built.

The setup

25 physical servers and two levels of virtualisation: 25 hosts ran 25 large virtual machines, which in turn ran 1,000 one-vCPU compute nodes.

Theory first

An idle cloud of this size sends about 10,000 RPC messages per reporting interval to about 25 consumers: 333 messages a second at a 30-second interval. So every message operation had to finish in about 3 ms, which no spinning disk can do.

The path: 250 → 500 → 750 → 1,000 nodes

Each step broke something. What we fixed along the way:

  • Keystone and Apache worker tuning.
  • Kernel network limits, and HAProxy and MySQL connection limits.
  • RabbitMQ in RAM with logging off (one of the values is undocumented), higher open-file limits and listener tuning.
  • Nova and Neutron worker and timeout tuning.
  • Entropy starvation on gateway nodes (fixed with haveged).
  • VIF plugging timeouts.
  • Nova cells v2 storing the transport URL in its database.
  • Queue corruption after forced RabbitMQ restarts: graceful shutdown only.

The tools were back-of-the-envelope maths, Bash, Tempest, Rally, and perf with IPC counts and flame graphs, which showed that the second bottleneck was the controllers, not RabbitMQ.

What worked

RabbitMQ split into two three-node clusters, one for Neutron and one for Nova and the rest, with five controllers. Mixing RAM and disk RabbitMQ nodes did not help.

Results (in a lab, slower than real hardware)

  • Stable compute nodes: from about 250 to 1,000.
  • First VM boot: from about 50 s to about 21 s.
  • Peak of 2,000 messages a second under stress; 1,000 VMs active, one per compute node.
  • More than 40,000 queues per RabbitMQ cluster degrades it; 1,000 nodes need about 50,000 (36,000 Neutron, 14,000 Nova).

The write-up helped Sales win 3+ new clients with more than $10M in potential revenue.