zoukankan      html  css  js  c++  java
  • [Nova] nova-scheduler 组件源码解析--源码结构图和各个模块的介绍。

    参考文章: http://blog.csdn.net/gaoxingnengjisuan/article/details/15615743 


    nova-scheduler 

    1. 主要功能:

    从多宿主机调度最适合的宿主机生成云主机。即:传入需要启动的云主机的列表,nova-scheduler根据云主机的数量、CPU消耗等参数进行调度,选择合适的物理机(hypervisor,宿主机,也就是nova-compute的节点),然后后启动这些云主机。


    2. 算法实现:

    常用的有过滤(filter)调度算法和随机调度算法(chance).。 默认的调度算法是filter-scheduler. 具体选用哪种算法,用户可以在nova.confg中进行配置。


    •Filtering
    –RetryFilter
    •Prevents the scheduler from selecting the host that fails to respond.
    –AvailablilityZoneFilter
    •Filters hosts by availability zone.
    –RamFilter
    •Select hosts that have sufficient RAM.
    •Can overcommitmentby configuration.
    –ComputeFilter
    •Passes all hosts that are operational andenabled.
    –ComputeCapabilitiesFilter
    •Satisfy the extra specs associated withthe instance type.
    –ImagePropertiesFilter
    •Filters hostsbased on properties defined on the instance's image.




    •Weighting
    –Each time the scheduler selects a hostand subsequent selections are adjusted accordingly.
    –Virtually consumes resources.


    Notes:

    目前的默认调度算法是 filter-scheduler,即过滤调度器,其思想是先进行一些条件过滤一些宿主机,比如要求可用内存大于2GB,小于2GB的直接过滤,过滤器可以串联多个,即层层过滤。然后对过滤后的宿主机进行权值计算,权值计算就是根据宿主机的状态进行评分(weight),最后根据评分(weight)排序,评分最高的为最佳候选宿主机,评分也是可以串联的,即层层评分。注意openstack的设计原则是可扩展,意味着调度算法、过滤函数、评分函数都是可插除的,用户可以自定义自己的调度器,过滤器,评分方法,而只需在配置文件中配置即可,无需修改核心代码。实现的过滤器很多,而评分函数目前只有内存评分,即根据内存使用量进行评分。

    注意:启动云主机时宿主机的位置并不是完全由scheduler控制,用户可以指定availability-zone,aggregate以及通过设置--hint来控制宿主机在某个集合中(本质还是过滤,即通过用户设定的条件进行过滤)


    具体请入口请参看: http://krystism.is-programmer.com/posts/64410.html

  • 相关阅读:
    ASP.NET(C#)图片加文字、图片水印
    CMake构建Visual Studio中MFC项目的Unicode问题
    用Visual Studio 2008(VS)编译WebKit的r63513
    此时学习中
    ASP.NET进阶——初学者的提高(长期)
    继续努力
    程序员阿士顿的故事
    iOS 深拷贝和浅拷贝
    Javascript中this的取值
    Lisp的本质(The Nature of Lisp)
  • 原文地址:https://www.cnblogs.com/double12gzh/p/10166186.html
Copyright © 2011-2022 走看看