nova-compute charm should set vm.swappiness to 0 or 1

Bug #1660248 reported by James Troup
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Nova Compute Charm
Fix Released
Medium
Liam Young
nova-compute (Juju Charms Collection)
Invalid
Medium
Liam Young

Bug Description

In our experience running clouds the hosts running nova-compute tend to end up with a lot of KVM processes (at least partially) swapped out because of the Ubuntu swapiness default of 60. I think the nova-compute charm should set vm.swappiness to either 1 or even 0.

Revision history for this message
James Troup (elmo) wrote :

To be a little more explicit; with the current/default swappiness,
we're trading off guest memory latency for extra page cache on the
host. Whether you're converged or not, that doesn't seem like a good
trade off to me.

James Page (james-page)
Changed in nova-compute (Juju Charms Collection):
importance: Undecided → Medium
status: New → Triaged
Alvaro Uria (aluria)
tags: added: canonical-bootstack
Liam Young (gnuoy)
Changed in nova-compute (Juju Charms Collection):
assignee: nobody → Liam Young (gnuoy)
milestone: none → 17.01
Revision history for this message
Ryan Beisner (1chb1n) wrote :

I agree, lowering vm.swappiness is beneficial on kvm hosts.

I'd like to see this exposed as a config value, as the wider impact to users of a forced default behavior change of 60 to 1 or 0 is unmeasured.

Revision history for this message
Liam Young (gnuoy) wrote :

This is exposed as a config value already via the sysctl charm config option. I think what we're talking about here is setting a best practise default

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-nova-compute (master)

Fix proposed to branch: master
Review: https://review.openstack.org/431568

Changed in nova-compute (Juju Charms Collection):
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-nova-compute (master)

Reviewed: https://review.openstack.org/431568
Committed: https://git.openstack.org/cgit/openstack/charm-nova-compute/commit/?id=9b9a712ec4e96e2af2d05476cb7e48c8d1602f16
Submitter: Jenkins
Branch: master

commit 9b9a712ec4e96e2af2d05476cb7e48c8d1602f16
Author: Liam Young <email address hidden>
Date: Thu Feb 9 11:57:45 2017 +0000

    Lower vm.swappiness to reduce guest memory latency

    Lowering the value of vm.swappiness to 1 (minimum amount of
    swapping without disabling it entirely) should reduce the
    guest memory latency.

    The default of 1 in the charm can be changed by the user by
    explicitly setting vm.swappiness in the sysctl charm setting.

    Change-Id: If9d3a9a0d15a84b86cfa7ba3620b66e7ea61d414
    Closes-Bug: 1660248

Changed in nova-compute (Juju Charms Collection):
status: In Progress → Fix Committed
James Page (james-page)
Changed in charm-nova-compute:
assignee: nobody → Liam Young (gnuoy)
importance: Undecided → Medium
status: New → Fix Committed
Changed in nova-compute (Juju Charms Collection):
status: Fix Committed → Invalid
James Page (james-page)
Changed in charm-nova-compute:
milestone: none → 17.02
James Page (james-page)
Changed in charm-nova-compute:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.