Dynamic VM Scheduling in OpenStack
by
Kazuhiko Yamashita
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
Dynamic VM Scheduling in OpenStack ʙ͜ͷલɺθΫγΟಡΜ͚ͩͲɺRFCΑΓ͔ͬͨ͠ฤʙ
Slide 2
Slide 2 text
ࢁԼ!QZBNB (.0ϖύϘٕज़ج൫νʔϜ γχΞɾϓϦϯγύϧ UFOTOBQPODPN QZBNBGVO TUOTKQ
Slide 3
Slide 3 text
45/4 -JOVY/444FSWFS TUOTKQ
Slide 4
Slide 4 text
45/4
Slide 5
Slide 5 text
No content
Slide 6
Slide 6 text
CNDT ٱ͠ͿΓʹΦϑϥΠϯͰ ࠷ߴ!!1 Ͱ͜Εը͚ͩͲͶ
Slide 7
Slide 7 text
ϖύϘͷΠϯϑϥߏ CPU StealʹىҼͨ͠ɺྡਓ εʔύʔˑϥΠϒϚΠάϨʔγϣϯ ·ͱΊͱɺ݁ࠗʹ͓͚Δେࣄͳ͜ͱ42બ ࠓ͢͜ͱ
Slide 8
Slide 8 text
ϖύϘͷΠϯϑϥߏ 0QFO4UBDL #BSFNFUBM "84 IFSPLV ($1 ཧαʔό7.ن ϗεςΟϯάܥͷαʔϏεɺ֤छج൫αʔϏεͰར༻ &,4 3%4 &MBTUJDYYYܥͷϚωʔδυαʔϏεΛத৺ʹར༻ (,& #JH2VFSZΛத৺ʹ"84ͷ%3ɺσʔλΤϯδχΞϦϯάͷج൫ͱͯ͠ར༻
Slide 9
Slide 9 text
0QFO4UBDL 0QFO4UBDLͰཧ͢Δ7.ͷ্ʹ ࣗࣾ։ൃͷΤϯδϯΛར༻ͯ͠ ,VCFSOFUFTΛσϓϩΠ 0QFO4UBDL #BSFNFUBM #BSFNFUBM #BSFNFUBM 7. 7. 7. ,VCFSOFUFT $POUBJOFS $POUBJOFS $POUBJOFS ,VCFSOFUFT
Slide 10
Slide 10 text
CPU StealʹىҼͨ͠ɺ ྡਓ
Slide 11
Slide 11 text
ॠؒɺ৺ɺॏͶͯ ຊ࣌ؒͰαʔϏεͬͯΔ͔Β ϐʔΫλΠϜ͕ॏෳ 9:00 12:00 20:00 ϐʔΫλΠϜ ϐʔΫλΠϜ ϐʔΫλΠϜ ϐʔΫλΠϜ ϐʔΫλΠϜ ϐʔΫλΠϜ
Slide 12
Slide 12 text
CPU Steal Ϧιʔε͕ୣ͍߹͍ʹͳΓɺCPU Steal͕ൃੜ
Slide 13
Slide 13 text
CPU Stealͷ֓೦ Hypervisor VM1 CPU͍͍ͨʂ 10ඵ͋͛Δ VM2 CPU͍͍ͨʂ 10ඵ͋͛Δ
Slide 14
Slide 14 text
VMڥʹ͓͚ΔCPU Stealͷ֓೦ Hypervisor VM1 CPU͍͍ͨʂ 10ඵ͋͛Δ VM2 CPU͍͍ͨʂ 10ඵ͋͛Δ ࣮ࡍ8ඵ͔͋͛͠ΒΕͳ͔ͬͨ ࠩͷ2ඵ͕CPU Steal
Slide 15
Slide 15 text
CPU Steal͕ى͖Δͱʁ αʔόॲཧೳྗͷԼ αʔόϝτϦΫεͷѱԽ HTTPͷϨΠςϯγͷѱԽ ଓͷ૿Ճ ϩʔυΞϕϨʔδͷ্ঢ
Slide 16
Slide 16 text
εʔύʔˑϥΠϒϚΠάϨʔγϣϯ
Slide 17
Slide 17 text
ϥΠϒϚΠάϨʔγϣϯ Hypervisor VM1 VM2 10ඵ CPU 2ඵ CPU Hypervisor VM1 10ඵ CPU VMΛఀࢭ͢Δ͜ͱͳ͘HypervisorؒΛҠಈ
Slide 18
Slide 18 text
ϥΠϒϚΠάϨʔγϣϯ Hypervisor Hypervisor VM1 Disk Memory VM1 Disk STEP 1 σΟεΫΛಉظ ※ڞ༗ετϨʔδΛར༻͍ͯ͠ͳ͍߹
Slide 19
Slide 19 text
ϥΠϒϚΠάϨʔγϣϯ Hypervisor Hypervisor VM1 Disk Memory VM1 Disk STEP 2 ϝϞϦΛಉظͯ͠੩ࢭΛͭ ※ڞ༗ετϨʔδΛར༻͍ͯ͠ͳ͍߹ Memory
Slide 20
Slide 20 text
OpenStackͷϥΠϒϚΠάϨʔγϣϯ https://docs.openstack.org/nova/pike/admin/con fi guring-migrations.html
Slide 21
Slide 21 text
ϥΠϒϚΠάϨʔγϣϯ Hypervisor Hypervisor VM1 Disk Memory VM1 Disk Memory STEP 3 ੩ࢭ͕औΕͨΒ৽͍͠ΠϯελϯεΛ ༗ޮʹͯ͠ɺωοτϫʔΫܦ࿏ΛΓସ͑Δ ͓લ͕ࠓ͔ΒVM1ͩ
Slide 22
Slide 22 text
εʔύʔˑϥΠϒϚΠάϨʔγϣϯ
Slide 23
Slide 23 text
εʔύʔˑϥΠϒϚΠάϨʔγϣϯ 1. VMʹ͓͍ͯStealͷൃੜΛݕ͍ͨ͠ 2.Stealͷൃੜ͍ͯ͠ͳ͍HypervisorʹεέδϡʔϦϯά͍ͨ͠ 3.μϯλΠϜΛൃੜͤͨ͘͞ͳ͍ 4.ࣗಈͰ৸ͯΔؒʹͯ͢ऴΘͬͯ΄͍͠ ͱ͍͏ͷΛɺRubyͰ࣮ͨ͠
Slide 24
Slide 24 text
VMͷStealൃੜݕ Load5͕͖͍͠Ҏ্͔ͭɺSteal͕ൃੜ͍ͯ͠Δ͜ͱ Steal͕ൃੜͯ͠ɺॲཧ͕Ԇ͍ͯ͠ͳ͍ͳΒͳ͍
Slide 25
Slide 25 text
εέδϡʔϦϯά HypervisorͷϝτϦΫεͰSteal͕͖͍͠ҎԼͰɺΑΓۭ͖͕͋Δ ಉ͡ϩʔϧͷVM͕ಉҰαʔόʹ͖͍͠Ҏ্ऩ༰͞Ε͍ͯͳ͍ ಉ͡AZͷαʔόͰ͋Δ
Slide 26
Slide 26 text
Availability Zone LB AZ-1 VM1 AZ-2 VM2 LB AZ-1 VM1 VM2 AZ-2 AZΛ·͍ͨͰεέδϡʔϦϯά͢Δͱ োੑ͕ഁ໓!!1
Slide 27
Slide 27 text
μϯλΠϜΛൃੜͤ͞ͳ͍ ΦʔέετϨʔλʔͰ͢Δ $ kubectl drain example.local --force --ignore-daemonsets —delete-emptydir-data # after migrated $ kubectl uncordon example.local $ consul maint -enable # after migrated $ consul maint -disable Kubernetes Consul
Slide 28
Slide 28 text
kubectl drain node-1 pod-1 Scheduling Disabled node-2 pod-2 pod-1 nodeͷPodͷׂΛఀࢭͯ͠ɺ͍ग़͢
Slide 29
Slide 29 text
consul node-1 (10.0.0.1) nginx node-2 (10.0.0.2) nginx node-3 (10.0.0.3) nginx $ dig web.service.consul a 10.0.0.1 10.0.0.2 10.0.0.3 ϔϧενΣοΫͳͲΛར༻ͯ͠ɺαʔϏεσΟεΧόϦ͕Ͱ͖Δ DNSͷଞʹɺConsul TemplateΛར༻ͨ͠ ߏϑΝΠϧͷϨϯμϦϯάͳͲͰ׆༻͍ͯ͠Δ
Slide 30
Slide 30 text
consul maint -enable node-1 (10.0.0.1) nginx node-2 (10.0.0.2) nginx node-3 (10.0.0.3) nginx $ dig web.service.consul a 10.0.0.1 10.0.0.2 Ϋϥελ͔ΒΓ͠ consul maint -enable
Slide 31
Slide 31 text
ॲཧܥ·ͱΊ Stealͷൃੜ͔ͭ ϩʔυΞϕϨʔδͷ্ঢ ࠷దͳ؋ͷબఆ Ϋϥελ͔ΒͷΓ͠ ϥΠϒϚΠάϨʔγϣϯ ΫϥελͷΈࠐΈ ࣮ߦڥͱͯ͠OpenStackͷ্Ͱಈ͘ Kubernetesͷதͷpodͱͯ͠ɺ Reconciliation loopͬΆ͘ಈ͍͍ͯΔ
Slide 32
Slide 32 text
ຊʹ͋ͬͨා͍
Slide 33
Slide 33 text
ʮεʔύʔˑϥΠϒϚΠάϨʔγϣϯ ಈ͍ͯΔΜͰ͚͢ͲɺϨΠςϯγ ߴ͍ΜͰ͢ΑͶʯ
Slide 34
Slide 34 text
ϥΠϒϚΠάϨʔγϣϯ͕ଳҬΛ৯͍Δ ͓ன͔Βഁ໓!!1
Slide 35
Slide 35 text
ϥΠϒϚΠάϨʔγϣϯ(࠶ܝ) Hypervisor Hypervisor VM1 Disk Memory VM1 Disk STEP 1 σΟεΫΛಉظ ※ڞ༗ετϨʔδΛར༻͍ͯ͠ͳ͍߹ ʊਓਓਓਓʊ ʼɹ500Gɹʻ ʉY^Y^Y^Y^ʉ
Slide 36
Slide 36 text
No content
Slide 37
Slide 37 text
No content
Slide 38
Slide 38 text
·ͱΊ ྡਓΛࣗͰεέδϡʔϥʔॻ͘͜ͱͰղܾͨ͠ OSSʹ͢ΔͱdeschedulerͷΑ͏ͳநʹͳΔͷͰɺ ࠓճެ։͠ͳ͔ͬͨ ϥΠϒϚΠάϨʔγϣϯҙ֎ͱଳҬ৯͏ͷͰɺωοτϫʔΫΛͯ͠ ϨʔτϦϛοτೖΕͨ΄͏͕͍͍
Slide 39
Slide 39 text
ଟɺձʹ͍ΔͷͰɺ టʹͳΓ·͠ΐ͏ʂʂʂ
Slide 40
Slide 40 text
No content
Slide 41
Slide 41 text
͓͠·͍ ࠷৽ͷ࠾༻ใΛνΣοΫˠ !QC@SFDSVJU