ZenossZenoss

blog

Analyzing OpenStack Capacity Allocation

Yesterday I was asked to help a customer to make a memory allocation report for their OpenStack environment. Straightforward problem, right? All we need to know is which instances (OpenStack VMs) are running on which server. I used the Zenoss Analytics reporting package, which means I can get my report without involving developers or DBAs.

What makes this challenge interesting is that the two values we need to compare are quite far apart in terms of connections through the Zenoss live model.

OpenStack tables

An OpenStack virtual machine is a running instance composed of a Flavor – the size of the VM, and the Image – the boot image. I needed total memory for all images running on one hypervisor.

Available hypervisor memory isn’t stored in OpenStack at all; it’s in the Linux operating system supporting the Nova host.

openstack report 1

My needs meant I needed to create a new data domain. A domain enables custom connections. Here I added in the tables corresponding to the model elements.

openstack report 2

Next step is to define how each of the tables are related, by using joins to identify matching values in different tables.

openstack report 3

Zooming in, you can see that an OpenStack host has a key for itself, and a key (_host_device_key)  that identifies the Linux server where it runs. The model supports multiple connections between elements.

openstack report 4

The first time I ran the report I noticed that per-instance memory and per-host were both recorded in bytes. It’s much easier to work in GB, so I created two new calculated fields with division.

Calculated fields are a great way to resolve what call the Furlongs Per Fortnight Problem, where the same metrics on different devices are published in very different units. For example, 128 GB on a Cisco UCS server is recorded as 131,072. That’s 128 x 1024. I’d think it would be 137,439,953,472 for 128*1024*1024*1024, and if I was comparing the Instance memory to the UCS memory I’d need to normalize.

openstack report 5

Changing the field Display properties makes my reports easier to build and read. Instead of “openstack_infrastructure_host_hostname” I can just reference Host Name.

openstack report 6

I used Ad Hoc views to test that I had the right data, and organize how I wanted the eventual report to look.

openstack report 7

With this report I can identify which of our OpenStack servers have memory available for more instances, and which are full. By the way, OpenStack suggests that you not go over 150% over-commitment on memory.

Common question – can I export this report? Sure, to PDF, Excel, and a bunch of other formats.

I hit my timebox on this report, so didn’t fix the minor issues in the final report. The second report covering allocation of processor cores can be an exercise for you!

Interested in learning more? Enter your email address below to subscribe to our blog!

Categories

Subscribe

Enter your email address in the box below to subscribe to our blog.

Loading
FEATURED CONTENT
WHITE PAPER
Zenoss Cloud Product Overview: Intelligent Application & Service Monitoring
Analyst Report
451 Research: New Monitoring Needs Are Compounding Challenges Related to Tool Sprawl

Enabling IT to Move at the Speed of Business

Zenoss is built for modern IT infrastructures. Let's discuss how we can work together.

Schedule a Demo

Want to see us in action? Schedule a demo today.