neutron-server over utilises RAM

Bug #1569928 reported by Sergii Golovatiuk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Sergii Golovatiuk
Mitaka
Fix Released
High
Sergii Golovatiuk

Bug Description

Currently, puppet configures neutron to have

1 master
2 api_workers
2 rpc_workers
1 rpc_state_report_workers

so we have 6 processes in total. Due to its nature neutron-server utilizes a lot of memory ~400Mb for every process. So we have 6* 400 ~ 2.3Gb only for neutron.

root@node-2:/etc/neutron# ps -C neutron-server -O rss | awk '{ count ++; sum += $2 }; END {count --; print "Number of processes =",count; print "Memory usage per process =",sum/1024/count, "MB"; print "Total memory usage =", sum/1024, "MB" ;};'
Number of processes = 6
Memory usage per process = 63.8444 MB
Total memory usage = 383.066 MB

That's pretty fine when MySQL or Rabbit was up before neutron. However, when they die they will not be able to allocate memory. For instance MySQL dies on start action with the following message

InnoDB: Initializing buffer pool, size = 512.0M InnoDB: mmap(549453824 bytes) failed; errno 12 2016-04-13 09:45:04 1201 [ERROR] InnoDB: Cannot allocate memory for the buffer pool 2016-04-13 09:45:04 1201 [ERROR] Plugin 'InnoDB' init function returned error. 2016-04-13 09:45:04 1201 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2016-04-13 09:45:04 1201 [ERROR] Unknown/unsupported storage engine: innodb 2016-04-13 09:45:04 1201 [ERROR] Aborting 2016-04-13 09:45:04 1201 [Note] Binlog end 2016-04-13 09:45:04 1201

Many of sporadic SWARM issues are based on this fact as alloc(), malloc() don't allocate RAM for services which have a great respect for allocating and releasing RAM.

Changed in fuel:
importance: Undecided → High
assignee: nobody → Sergii Golovatiuk (sgolovatiuk)
milestone: none → 9.0
status: New → Confirmed
Revision history for this message
Bogdan Dobrelya (bogdando) wrote :

From Fuel side the only thing we can do is to use cgroups

tags: added: cgroups tech-debt
tags: added: area-library
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to fuel-library (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/305319

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/305319
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=04947928d5f21c9df9bf433834ad32fac5efb5c9
Submitter: Jenkins
Branch: master

commit 04947928d5f21c9df9bf433834ad32fac5efb5c9
Author: Sergii Golovatiuk <email address hidden>
Date: Wed Apr 13 15:43:54 2016 +0200

    Lower number of workers for neutron-server workers

    - Have 1 api_worker, 1 rpc_worker, 1 rpc_state_report_worker on server
      with single CPU to have 4 neutron-server processes in total instead of
      6. On dual core CPU there will be 5 workers instead of 9. It doesn't
      impact on scalability due to context switching and queue limitation.
      This fix reduces sporadic SWARM/Galera/Rabbit failures

    Related-Bug: #1569928

    Change-Id: I6f308c1922d305eafa057036289b86a0c0fec4d7
    Signed-off-by: Sergii Golovatiuk <email address hidden>

Revision history for this message
Dmitry Pyzhov (dpyzhov) wrote :

This bug affects users

tags: removed: tech-debt
no longer affects: fuel/newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to fuel-library (stable/mitaka)

Related fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/312599

Changed in fuel:
status: Confirmed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to fuel-library (stable/mitaka)

Reviewed: https://review.openstack.org/312599
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=1c2946ad9d16df597a4bf74de374ad04a33daf99
Submitter: Jenkins
Branch: stable/mitaka

commit 1c2946ad9d16df597a4bf74de374ad04a33daf99
Author: Sergii Golovatiuk <email address hidden>
Date: Wed Apr 13 15:43:54 2016 +0200

    Lower number of workers for neutron-server workers

    - Have 1 api_worker, 1 rpc_worker, 1 rpc_state_report_worker on server
      with single CPU to have 4 neutron-server processes in total instead of
      6. On dual core CPU there will be 5 workers instead of 9. It doesn't
      impact on scalability due to context switching and queue limitation.
      This fix reduces sporadic SWARM/Galera/Rabbit failures

    Related-Bug: #1569928

    Change-Id: I6f308c1922d305eafa057036289b86a0c0fec4d7
    Signed-off-by: Sergii Golovatiuk <email address hidden>
    (cherry picked from commit 04947928d5f21c9df9bf433834ad32fac5efb5c9)

tags: added: in-stable-mitaka
Changed in fuel:
status: Fix Released → Fix Committed
Revision history for this message
Alex Schultz (alex-schultz) wrote :

Verified on 9 #465

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.