Comment #20 on issue 127 by [email protected]: Wrong calculation of free
memory when using KVM (ganeti and hbal)
https://code.google.com/p/ganeti/issues/detail?id=127
Some minor fixes/changes based on discussion with [email protected]:
mem_inst = sum(runtime_mem_of_running_instances)
mem_free = physical_mem_free + swap_free
mem_missing = mem_total + swap_total - mem_inst - mem_node - mem_free
mem_available = (mem_total - mem_node - max(0, mem_missing))*memory_ratio -
mem_inst
Changes:
1. Clarify physical_mem_free = free + cache + buffers. That is the current
ganeti definition.
2. In mem_available, the mem_missing term was moved so that we take the
more conservative approach of not overcommitting missing memory.
3. In mem_available, mem_used should have been mem_inst because otherwise
we count mem_node twice.
A possibly more intuitive meaning of mem_missing is: mem_missing =
mem_used_state_of_world(swap+RAM-free) -
mem_used_state_of_record(instances+node)
We can also add a cluster verify warning for not having enough swap to over
overcommittment: (mem_physical_total - mem_node)*memory_ratio <=
mem_physical_total + swap_total
As per the memory overcommittment design, it is up to the administrator to
ensure that there is enough swap (or not) to cover overcommitted memory,
but we can certainly add a cluster verify warning to make that easier.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings