Index ¦ Archives ¦ Atom

Placement Container Playground 3

Continued explorations of winnowing the size of the OpenStack placement service by attempting to remove requirements and adjust code imports, all within a container for easy isolation. The previous discussion is at Placement Container Playground 2.

Today I decided I wanted to run the setup from Placement Scale Fun against the container experiments, so that it was easy to add more placement services on different hosts.

But first, based on the earlier exploration, I integrated three more changes into the container setup:

  • Using nova.db.api directly. This makes it so that nova/db/ has no code and thus does not inadvertently load in more modules.
  • Moving DB constants to own file. This was needed so that the inventory handler for placement (which uses some of the constants) doesn't have to load other stuff.
  • Isolate configuration loading. This has placement using its own code to load and process configuration so that it doesn't have to import RPC and DB related modules that it doesn't use.

With those changes integrated (the Dockerfile, which makes no claim to being proper, can be found in the placedock repo), along with the changes listed in the previous post, the size of an individual placement UWSGI process shrinks. In my environment after running under load for a while:

  • Master: VSZ: 273924, RSS 106216
  • Lightweight: VSZ 180840, RSS 74452

This is nice, but I suspect there's more room to be saved if we want.

With that in place, I set up 4 containers running placement. Two on the control plane host, and two on the compute host. The apache configuration for proxying to multiple UWSGI services looks like this (assuming the generic uwsgi stuff is set up elsewhere, which devstack does for you):

<Proxy balancer://placement>
    BalancerMember uwsgi://
    BalancerMember uwsgi://
    BalancerMember uwsgi://
    BalancerMember uwsgi://

ProxyPass "/placement" balancer://placement

This works well when creating a bunch of instances as described in the scale fun. Requests were nicely balanced around the 4 containers, each of which kept a nice stable size and didn't sweat.

There are a few remaining warts being loaded into the service that it would be nice to avoid:

  • oslo_service is loaded for the sake of setting some log_options. This means eventlet and greenlet are in the mix. These are not needed by placement.
  • castellan is imported by nova/conf/ That is imported as a result of wanting to use nova.conf. This results in a mess of cryptography related modules and libraries being required.

It's not immediately obvious if there are workarounds for these issues. At least not prior to placement having its own configuration file and setup.

© Chris Dent. Built using Pelican. Theme by Giulio Fidente on github.