OpenStack Nova Scheduler

8,638 views

Published on

Published in: Technology, Business

OpenStack Nova Scheduler

  1. 1. Solving problems, the cloud way!Peeyush Gupta
  2. 2. What is it?● OpenStack is a cloud operating system thatcontrols large pools of compute, storage, andnetworking resources throughout a datacenter,all managed through a dashboard that givesadministrators control while empowering theirusers to provision resources through a webinterface.(Got it!)● Provides an Infrastructure as a Service (IaaS)- Elasticity- Virtualization
  3. 3. Virtualization● Why?- Efficiency● How?-Hypervisor- KVM/QEMU/libvirt
  4. 4. Virtualization
  5. 5. 7 Components● Horizon – the Dashboard● Keystone – the Authentication system● Swift – the Object storage● Glance – the Image repository● Nova – the Core of the system● Quantum – the Networking component● Cinder – the Volume guy!
  6. 6. Communication● Database● Message Queue- uses AMQP- Implemented through rabbitmq server
  7. 7. Conceptual Architecture
  8. 8. Logical Architecture
  9. 9. Nova● The big daddy!●Responsible for storing, retrieving images fromGlance and running the instances.● Provides virtual instances on demand.
  10. 10. Nova – the Components● Nova-api : Talks to the user● Nova-compute : creates/terminates VMinstances.● Nova-volume : Volume guy, again!● Nova-network : Performs networking tasks.● Nova-scheduler : Determines on which host aparticular instance should run.● Console Services
  11. 11. Nova – the Components● Nova-network- Floating and Fixed IPs- Supports three kind of networking- Flat- Flat DHCP- VLAN● Nova-volume- Used to add more storage to the runninginstances.
  12. 12. Nova-scheduler● Takes a VM instance and determine where itshould run (on which host).● 2 step process
  13. 13. Filtering● 3 choices- Simple : Finds the least loaded host.- Random : Selects a random available host.- Zone : Selects a random host within anavailability zone.● Defaults- Volume Scheduler – Chance (Random)- Compute Scheduler – Filter (AvailabilityZone, RAM and capability)● Need more?- Try hints!
  14. 14. RAM-Filter
  15. 15. Availability Zone-Filterv
  16. 16. Compute-Filter
  17. 17. Other Options● Core Filter : Filters on the basis of availableCPU cores.● Isolated Hosts Filter : Allows to generateisolated sets of images and hosts.● Disk Filter : Schedule instances if there aresufficient disk available for ephemeral storage.● And so on...
  18. 18. Host Aggregates● Partition the availability zone further.● Only visible to admin, not to users.● Each node can have multiple aggregates, eachaggregate can have multiple key-value pairs,and the same key-value pair can be assignedto multiple aggregate.● Uses aggregate_instance_extra_specs filter.
  19. 19. Weighing● Scheduler applies cost functions on each hostand calculates the weight.● The least weighted host wins.
  20. 20. The Actors Behind The Scene● Manager(gets the rpc call from API) calls up thedriver to run the instance:
  21. 21. The Actors Behind The Scene● The filter scheduler (default), calls up the its_scheduler function
  22. 22. The Actors Behind The Scene● _schedule function calls up get-filtered-hostfunction and weight function of host manager
  23. 23. The Actors Behind The Scene● Filtering happens here, finally!● get_filtered_hosts() function ofhost_manager.py filters hosts and returns onlyrthe ones passing all filters.● get_weighed_host() weigh the filtered hosts,according to the weighs set by weigh handler.
  24. 24. In the end...● The scheduler manager sends an rpc call to thecompute manager of selected hosts.● The compute manager receives it from thequeue and runs its create_instance method andwe get a running VM instance.
  25. 25. Thank You

×