Bug 1594976

Summary: low-memory-usage.yaml should lower NovaReservedHostMemory to 512MB
Product: Red Hat OpenStack Reporter: Andreas Karis <akaris>
Component: openstack-tripleo-heat-templatesAssignee: Rajesh Tailor <ratailor>
Status: CLOSED ERRATA QA Contact: Arik Chernetsky <achernet>
Severity: low Docs Contact:
Priority: low    
Version: 13.0 (Queens)CC: apevec, dpeacock, jschluet, lhh, lmarsh, lyarwood, mbooth, mburns, owalsh, ramishra, ratailor, srevivo
Target Milestone: z3Keywords: Triaged, ZStream
Target Release: 13.0 (Queens)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-8.0.7-2.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-13 22:27:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andreas Karis 2018-06-25 21:56:07 UTC
Description of problem:
Since Queens (perhaps Pike?), nova-compute reserved host memory by default is 4096. This doesn't work out well in low memory environments:
~~~
(overcloud) [stack@undercloud-1 ~]$ grep 4096 -C10 /usr/share/openstack-tripleo-heat-templates/puppet/services/nova-compute.yaml
      processes.
      Ex. NovaVcpuPinSet: ['4-12','^8'] will reserve cores from 4-12 excluding 8
    type: comma_delimited_list
    default: []
    tags:
      - role_specific
  NovaReservedHostMemory:
    description: >
      Reserved RAM for host processes.
    type: number
    default: 4096
    constraints:
      - range: { min: 512 }
    tags:
      - role_specific
  MonitoringSubscriptionNovaCompute:
    default: 'overcloud-nova-compute'
    type: string
  NovaComputeLoggingSource:
    type: json
    default:
~~~

~~~
[root@overcloud-compute-0 ~]# grep reserv /var/lib/config-data/puppet-generated/nova_libvirt -R | egrep -v ':#'
/var/lib/config-data/puppet-generated/nova_libvirt/etc/nova/nova.conf:reserved_host_memory_mb=4096
[root@overcloud-compute-0 ~]# 
~~~

~~~
(overcloud) [stack@undercloud-1 ~]$ nova hypervisor-show d787b5c3-d83f-4246-9338-5083bfbb6058 | grep mb
| free_ram_mb               | -1                                       |
| memory_mb                 | 4095                                     |
| memory_mb_used            | 4096                                     |
(overcloud) [stack@undercloud-1 ~]$ 
~~~

The templates provide a low-memory-usage.yaml file:
/usr/share/openstack-tripleo-heat-templates/environments/low-memory-usage.yaml

Change that .yaml to include NovaReservedHostMemory: 512
~~~
# Lower the memory usage of overcloud.
parameter_defaults:
  CinderWorkers: 1
  GlanceWorkers: 1
  HeatWorkers: 1
  KeystoneWorkers: 1
  NeutronWorkers: 1
  NovaWorkers: 1
  SaharaWorkers: 1
  SwiftWorkers: 1
  GnocchiMetricdWorkers: 1

  ApacheMaxRequestWorkers: 100
  ApacheServerLimit: 100

  ControllerExtraConfig:
      'nova::network::neutron::neutron_url_timeout': '60'

  DatabaseSyncTimeout: 900

  # Override defaults to get HEALTH_OK with 1 OSD (for testing only)
  CephPoolDefaultSize: 1
  CephPoolDefaultPgNum: 32

  NovaReservedHostMemory: 512
~~~

Comment 1 Steve Baker 2018-06-26 00:26:45 UTC
Assigning to Compute DFG for triage

Comment 2 Rajesh Tailor 2018-06-29 10:50:59 UTC
There is a patch submitted upstream [1], which needs to be backported to OSP13.

[1] https://review.openstack.org/#/c/577938/

Comment 14 errata-xmlrpc 2018-11-13 22:27:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3587