Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize the overallocation of memory ram of openstack host

2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces how to achieve openstack host memory ram overallocation, the article is very detailed, has a certain reference value, interested friends must read it!

One of the main ways that openstack provides resource utilization is to overallocate memory when creating virtual machines. The selection strategy for the physical host is shown in the following code:

Def host_passes (self, host_state, filter_properties): "Only return hosts with sufficient available RAM." Instance_type = filter_properties.get ('instance_type') requested_ram = instance_type [' memory_mb'] free_ram_mb = host_state.free_ram_mb total_usable_ram_mb = host_state.total_usable_ram_mb ram_allocation_ratio = self._get_ram_allocation_ratio (host_state Filter_properties) memory_mb_limit = total_usable_ram_mb * ram_allocation_ratio used_ram_mb = total_usable_ram_mb-free_ram_mb usable_ram = memory_mb_limit-used_ram_mb if not usable_ram > = requested_ram: LOG.debug (" % (host_state) s does not have% (requested_ram) s MB "" usable ram It only has% (usable_ram) s MB usable ram. ", {'host_state': host_state,' requested_ram': requested_ram, 'usable_ram': usable_ram}) return False # save oversubscription limit for compute node to test against: host_state.limits [' memory_mb'] = memory_mb_limit return True

Total_usable_ram_mb is the physical memory that the physical host can provide. For example, 4G _ 8G _ is set in nova.conf. The default overallocation factor for openstack is 1.5. Free_ram_mb is the remaining memory value of the host, which can be negative. Used_ram_mb is used to allocate memory, which is generally the sum of virtual machine memory created on that host. "memory_mb_limit is excess memory, and when the remaining available useble_ram memory is less than the memory required for the creation of the virtual machine, the host cannot create the virtual machine, and the system will not select the host to create the virtual machine."

The above is all the contents of the article "how to achieve openstack host memory ram overallocation". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report