Total RAM is incorrect in memory constrained LXC containers

Bug #1426173 reported by Billy Olsen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql (Juju Charms Collection)
New
Undecided
Unassigned
percona-cluster (Juju Charms Collection)
Won't Fix
Undecided
Unassigned

Bug Description

For the percona-cluster charm, the value for the innodb_buffer_pool_size based on a % of the total system memory is incorrect. On an LXC container constrained to 1GB the check for total system memory returns the amount of memory available to the host system, not the container.

The charm determines the total memory for the system by checking /proc/meminfo, which isn't cgroup aware so it returns information for the host system rather than the the LXC container.

Note: a work around would be to set the value for the dataset-size or the innodb-buffer-pool-size (depending on version of charm) to a specific value rather than leave it as a percentage.

summary: - Calculations for Total RAM are incorrect in LXC containers
+ Total RAM is incorrect in memory constrained LXC containers
Revision history for this message
Nobuto Murata (nobuto) wrote :

lxcfs[1] will solve it for vivid or later, not sure how for trusty though.

[1] https://s3hh.wordpress.com/2015/02/23/introducing-lxcfs/

Revision history for this message
James Page (james-page) wrote :

We don't intend to try to resolve this until Juju starts applying contraints to LXD containers that it provisions, at which point /proc/meminfo becomes accurate and using a % of the system memory will make sense again.

Changed in percona-cluster (Juju Charms Collection):
status: New → Won't Fix
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.