diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-06-25 18:00:19 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-06-25 18:00:19 +0000 |
| commit | 2c7aa901b9174a4a4f04c5f8a52ef6c9d2d5d27c (patch) | |
| tree | 21775987dc6e3c91bd49a3b50af090ecece3cdce /doc/source | |
| parent | 259cf1cd39a46b36f47014d1b9770b52a563e9df (diff) | |
| parent | 1b40708287808243be27b83791b7d23f8b51b194 (diff) | |
Merge "Fixes ram_allocation_ratio based over subscription"
Diffstat (limited to 'doc/source')
| -rw-r--r-- | doc/source/devref/filter_scheduler.rst | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/source/devref/filter_scheduler.rst b/doc/source/devref/filter_scheduler.rst index 5ae5bcd4e..91cf0e5a0 100644 --- a/doc/source/devref/filter_scheduler.rst +++ b/doc/source/devref/filter_scheduler.rst @@ -62,7 +62,9 @@ code. For example class |RamFilter| has the next realization: instance_type = filter_properties.get('instance_type') requested_ram = instance_type['memory_mb'] free_ram_mb = host_state.free_ram_mb - return free_ram_mb * FLAGS.ram_allocation_ratio >= requested_ram + total_usable_ram_mb = host_state.total_usable_ram_mb + used_ram_mb = total_usable_ram_mb - free_ram_mb + return total_usable_ram_mb * FLAGS.ram_allocation_ratio - used_ram_mb >= requested_ram Here `ram_allocation_ratio` means the virtual RAM to physical RAM allocation ratio (it is 1.5 by default). Really, nice and simple. |
