Enviar búsqueda
Cargar
BitVisor と KVM の性能比較時の落とし穴 & BitVisor Advent Calendar について
•
0 recomendaciones
•
1,699 vistas
T
Takaaki Fukai
Seguir
BitVisor Summit 5 (2016年11月30日)
Leer menos
Leer más
Tecnología
Denunciar
Compartir
Denunciar
Compartir
1 de 46
Descargar ahora
Descargar para leer sin conexión
Recomendados
ライブマイグレーション実装で体験したデバッグの解説
ライブマイグレーション実装で体験したデバッグの解説
Takaaki Fukai
EPT と TLB でしくじった話
EPT と TLB でしくじった話
Takaaki Fukai
Unsafe Nested Virtualization on Intel CPU
Unsafe Nested Virtualization on Intel CPU
Takaaki Fukai
そのベンチマークソフト本当に大丈夫ですか?
そのベンチマークソフト本当に大丈夫ですか?
Takaaki Fukai
kvm-clock に時間を尋ねるのは間違っているだろうか
kvm-clock に時間を尋ねるのは間違っているだろうか
Takaaki Fukai
Rancher.ioを試してみる
Rancher.ioを試してみる
Takaaki Fukai
僕の考えたさいきょーのVMM開発環境
僕の考えたさいきょーのVMM開発環境
Takaaki Fukai
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Recomendados
ライブマイグレーション実装で体験したデバッグの解説
ライブマイグレーション実装で体験したデバッグの解説
Takaaki Fukai
EPT と TLB でしくじった話
EPT と TLB でしくじった話
Takaaki Fukai
Unsafe Nested Virtualization on Intel CPU
Unsafe Nested Virtualization on Intel CPU
Takaaki Fukai
そのベンチマークソフト本当に大丈夫ですか?
そのベンチマークソフト本当に大丈夫ですか?
Takaaki Fukai
kvm-clock に時間を尋ねるのは間違っているだろうか
kvm-clock に時間を尋ねるのは間違っているだろうか
Takaaki Fukai
Rancher.ioを試してみる
Rancher.ioを試してみる
Takaaki Fukai
僕の考えたさいきょーのVMM開発環境
僕の考えたさいきょーのVMM開発環境
Takaaki Fukai
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
taisei2219
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
iPride Co., Ltd.
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
Toru Tamaki
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
Toru Tamaki
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
Hiroki Ichikura
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
Toru Tamaki
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Yuma Ohgami
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
sugiuralab
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
Ryo Sasaki
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Más contenido relacionado
Último
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
taisei2219
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
iPride Co., Ltd.
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
Toru Tamaki
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
Toru Tamaki
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
Hiroki Ichikura
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
Toru Tamaki
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Yuma Ohgami
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
sugiuralab
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
Ryo Sasaki
Último
(9)
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
Destacado
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
Destacado
(20)
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
Skeleton Culture Code
Skeleton Culture Code
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
BitVisor と KVM の性能比較時の落とし穴 & BitVisor Advent Calendar について
1.
BitVisor と KVM
の 性能比較時の落とし穴 深井 貴明(筑波大学) 2016年11月30日 & BitVisor Advent Calendar について
2.
BitVisor と KVM
の 性能比較時の落とし穴 深井 貴明(筑波大学) 2016年11月30日
3.
発表趣旨 • BitVisor, KVM
の性能比較時に陥った問題の紹介 • なぜか KVM が異様に遅い • なぜか KVM の方が速い • 時には物理マシンよりもKVMが速いことも… • etc… • 同じ悲劇繰り返さないために情報を共有 3
4.
Table of Contents •
背景 • 事例紹介 • Case 1: kvm-clock • Case 2: 64bit ホストOS と 32bit ゲストOS 混在 • Case 3: CPU クロック • Case 4: KVM ゲストへのメモリ割り当て • Case 5: 割り込みの分散 • Case 6: BitVisor の EPT 用バッファ • Case7: YCSB と NoSQL • まとめ 4
5.
BitVisor と KVM
の設計比較 Hardware BitVisor KVM OS Hardware OS パススルー アクセス KVMBitVisor 5 KVM が アクセスに介入 共通点: VT-x で CPUと メモリを仮想化
6.
想定される性能評価の結果 CPU, Memory インテンシブなワークロード •
KVM ≒ BitVisor < 物理マシン I/O インテンシブなワークロード • KVM << KVM (PCI-passthrough) ≲ BitVisor < 物理マシン 6
7.
事例紹介 • Case 1:
kvm-clock • Case 2: KVM ゲストへのメモリ割り当て • Case 3: 64bit ホストOS と 32bit ゲストOS 混在 • Case 4: CPU クロック • Case 5: BitVisor の EPT 用バッファ • Case 6: YCSB と NoSQL • Case 7: 割り込みの分散 (Rare) 7
8.
BitVisor 遅い KVM 速い 事例紹介 •
Case 1: kvm-clock • Case 2: KVM ゲストへのメモリ割り当て • Case 3: 64bit ホストOS と 32bit ゲストOS 混在 • Case 4: CPU クロック • Case 5: BitVisor の EPT 用バッファ • Case 6: YCSB と NoSQL • Case 7: 割り込みの分散 (Rare) 8 KVM 遅い その他
9.
Case1: kvm-clock 現象: Sysbench
のメモリテストでKVMが異様に遅い 9http://www.slideshare.net/DeepTokikane/kernel-vmkvmclock
10.
原因究明作業 • 方針:小さいブロックサイズで頻発するイベントを探す • perf
コマンドで,VMExit の回数を調べる →VMExit の回数はブロックサイズに依存しない • strace で呼び出すシステムコールの回数を調べる →タイマの読み出しが頻発 10
11.
原因と対策 • 原因: kvm-clock
の読み出しが遅い • 対策: clocksource を tsc に変更 • /sys/devices/system/clocksouce/clocksouce0/current_clocksource を変更 11
12.
どの程度差があるのか? 12http://www.slideshare.net/DeepTokikane/kernel-vmkvmclock
13.
どの程度差があるのか? 13http://www.slideshare.net/DeepTokikane/kernel-vmkvmclock
14.
Case 2: KVM
ゲストへのメモリ割り当 現象: 全体的にKVM が遅い • コンソールは異様に重い • NoSQL サーバのベンチマークスコアが悪い 原因: KVM の VM にメモリを割り当てすぎて,KVMホスト がswapping 14
15.
原因究明作業 • ふと思い立って KVM
ホストのメモリ使用量を見る • free コマンドで • swap が結構使われていた… 15
16.
原因と対策 原因: KVM の
VM にメモリを割り当てすぎ 対策: ホストでswapoff & メモリ割り当て量を調整 • 適切な最大メモリ量を割り出す方法が見つからない • Try and Error で少しづつ増やしたり減らしたりする • swapoff 時に割り当てメモリが多すぎる → VM が起動しない 16
17.
Case3: 64bit ホストOS と
32bit ゲストOS 混在 評価環境 17 32bit Linux Hardware 物理マシン BitVisor 32bit Linux Hardware 64bit Linux (KVM) 32bit Linux Hardware BitVisor KVM
18.
Case3: 64bit ホストOS と
32bit ゲストOS 混在 評価環境 18 32bit Linux Hardware 物理マシン BitVisor 32bit Linux Hardware 64bit Linux (KVM) 32bit Linux Hardware BitVisor KVM 現象: ベンチマークの結果 (memcached だったと思う) これが一番速い
19.
原因究明作業 ググる • 「32bit linux
slower」 とか 19
20.
原因と対策 原因: 64bit OS
の方がドライバが高速(らしい) • 物理マシンでは,32bit OS が MMIO を発行 • KVM では,64bit ホスト OS が MMIO を肩代わり 対策: 64 bit KVM ホストと32bit ゲストを混在させない 20
21.
Case 4: CPUクロックの動的変化 現象:
ベンチマークのスコア 物理マシン, BitVisor < KVM • YCSB の NoSQL のベンチマーク • Sysbench の memory テスト 21
22.
原因究明 • perf コマンドでベンチマークを解析 •
CPU cycles は物理マシンの方が少ない • 実行時間はKVM の方が速い • turbostat コマンドで CPU クロックを確認 22
23.
原因と対策 原因: SpeedStep &
C ステート関係の設定 • Linux のブートオプションでCステートを制限 • processor.max_cstate=0 • これだと acpi の idle が走りクロックが上がらない • 一方 KVM はクロックが下がってなかった 対策: SpeedStep を無効化 & idle を polling に変更 • ブートオプション idle=poll • 性能最大化の手段の一つらしい • http://itpeernetwork.intel.com/how-to-maximise-cpu- performance-for-the-oracle-database-on-linux/ 23
24.
Case 5: BitVisor
の EPT 用バッファ 現象: Redis + YCSB で BitVisor が遅い 原因究明: • VMExit の回数を調べる → EPT Violation が多い • BitVisor のコードを読む 24
25.
原因 原因: EPT 用のバッファが小さい
& 枯渇時の処理が雑 • 元々は4MB…4KB paging で 2GB マップできない • (4MB / 8 B) * 4KB = 2GB • バッファ枯渇時にすべてのマッピングをクリアしている • 2013年ごろのBitVisorベースの話 25
26.
対策 • バッファサイズを増やす • core/vt_ept.h
の #define NUM_OF_EPTBL マクロを変更 • Huge Page を使う • バッファ枯渇時の処理を改善する • パッチを加工 by 榮樂さん 26
27.
Case 6: 割り込み分散の有無 現象:
KVM だけ速い 原因: 割り込みがKVM だけ分散している とあるA社マザーボード • 割り込みをラウンドロビンで分散できない KVM • 割り込みを仮想化する段階で分散する 27
28.
Case 7: NoSQL 現象:
YCSB のスコアをグラフにすると不思議な形に • クライアントのスレッド数に比例せずにギザギザになる 原因究明: NoSQL の処理について調査 原因: NoSQL の永続化処理が非同期に走るため 対策: 永続化処理を無効にする,etc… 28
29.
因果関係まとめ 原因 結果 kvm-clock 遅い
頻繁にタイマを読む とKVMが遅い KVM ホストのswapping KVM が遅い 32bit/64bit OS 混在 64bit ホストのKVM > 32bit ゲストの 物理マシン speedstep + Cステート無効でCPU クロックが落ちる 物理マシンが遅い EPT クリアが頻発 BitVisor が遅い 割り込み分散の有無 分散しないと遅い NoSQL が非同期に永続化処理 スコアが不安定に 29
30.
対策まとめ 原因 対策 kvm-clock 遅い
clocksource を tsc に変更 KVM ホストのswapping ホストでswapoff 32bit/64bit OS 混在 32bit/64bit を混在させない speedstep + Cステート無効 でCPUクロックが落ちる BIOS で speedstep 無効化 + poll=idle EPT クリアが頻発 EPT用のバッファを増やす, パッチを書く,etc 割り込み分散の有無 分散の有無を揃える NoSQL が非同期に永続化 処理 永続化を無効化 30
31.
便利なツール • perf コマンド •
*trace コマンド • strace, ftrace, dtrace • turbostat コマンド 31
32.
その他工夫 • ベンチマークなどは徹底的にスクリプト化 • 測定からグラフ化まで •
不可思議なことはたくさん起きる → 測定の再現,繰り返しが重要 • iPXE, ssh などを駆使すれば,物理マシン/BitVisor/KVM の切り替えも自動化できる 32
33.
まとめ • 性能測定時に陥った問題について紹介 • 現象,原因究明の過程,原因,対策 •
皆さんの研究,開発のお役に立てば幸いです 33
34.
Q&A 34
35.
BitVisor Advent Calendar について 深井
貴明(筑波大学) 2016年11月30日
36.
端的に言うと 皆さん BitVisor Advent Calendar
の 記事を書いてください 36
37.
What is “Advent
Calendar”? アドベントカレンダー - Wikipedia より • 「アドベントカレンダー(Advent calendar)は、クリスマス までの期間に日数を数えるために使用されるカレン ダーである。」 37
38.
What is “Advent
Calendar”? アドベントカレンダー - Wikipedia より • 「アドベントカレンダー(Advent calendar)は、クリスマス までの期間に日数を数えるために使用されるカレン ダーである。」 • 「インターネット上などで、アドベントカレンダーに見立 てて12月に一人、または複数人で毎日記事を投稿して いくという企画がある。 特にプログラミングに関連する アドベントカレンダーの企画が近年多数行われてい る。」 38
39.
昨年のAdvent Calendar の例 (システムソフトウェア) •
Linux • Gentoo • Arch Linux • FreeBSD • NetBSD • etc… 39
40.
40 そして http://qiita.com/advent-calendar/2015/bitvisor を僕が作りました
41.
41http://qiita.com/advent-calendar/2015/bitvisor
42.
BitVisor Advent Calendar
をやる意義 BitVisor コミュニティの問題に対する起爆剤 • コミュニティの盛り上がりに欠ける • 深刻なドキュメント不足 みんなでAdvent Calendar の記事を書けば • お祭りっぽく盛り上がる • BitVisor に関するブログ記事が増える 42
43.
今の BitVisor Advent
Calendar 2016 43http://qiita.com/advent-calendar/2016/bitvisor
44.
何を書けばいいのか? BitVisor に絡んでいればなんでもOK • BitVisor
の xx 機能を試してみた (VPN, 暗号化など) • BitVisor で xx やってみた • BitVisor 思い出話 • BitVisor 苦労話 • BitVisor に絡んだ研究紹介 • BitVisor で困っていること • BitVisor でこんなことできたらおもしろそう • etc… 44
45.
まとめ 皆さん BitVisor Advent Calendar
の 記事を書いてください 45 BitVisor コミュニティの発展のために
46.
Q&A 46
Descargar ahora