Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Kubernetesはschedulerのパフォーマンスをどのように計測しているか
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
sanposhiho
July 21, 2021
1.1k
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Kubernetesはschedulerのパフォーマンスをどのように計測しているか
Kubernetes Meetup Tokyo #43 LT
https://k8sjp.connpass.com/event/217089/
sanposhiho
July 21, 2021
More Decks by sanposhiho
See All by sanposhiho
Understanding the Kubernetes Scheduler: Internals, Roadmap, and Contributions
sanposhiho
1
150
kube-scheduler: from 101 to the frontier
sanposhiho
1
290
A Tale of Two Plugins: Safely Extending the Kubernetes Scheduler with WebAssembly
sanposhiho
0
260
人間によるKubernetesリソース最適化の”諦め” そこに見るリクガメの可能性
sanposhiho
2
2.2k
Don't try to tame your autoscalers, tame Tortoises!
sanposhiho
0
830
メルカリにおけるZone aware routing
sanposhiho
4
1.8k
A tale of two plugins: safely extending the Kubernetes Scheduler with WebAssembly
sanposhiho
1
620
メルカリにおけるプラットフォーム主導のKubernetesリソース最適化とそこに生まれた🐢の可能性
sanposhiho
1
1k
MercariにおけるKubernetesのリソース最適化のこれまでとこれから
sanposhiho
8
4.2k
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
Marketing to machines
jonoalderson
1
5.4k
Bash Introduction
62gerente
615
210k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
330
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
940
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.3k
Balancing Empowerment & Direction
lara
6
1.1k
sira's awesome portfolio website redesign presentation
elsirapls
0
270
The Cult of Friendly URLs
andyhume
79
6.9k
How to Ace a Technical Interview
jacobian
281
24k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
Transcript
Kubernetesはschedulerのパフォーマ ンスをどのように計測しているか @sanposhiho
お前 is 誰 名前: Kensei Nakada / sanposhiho 所属: 京都大学
Google Summer of Code @Kubernetes @sanposhiho @sanpo_shiho
web-based simulator for scheduler behaviour web上でschedulerの動作を 試せるもの 今日紹介する scheduler_perfの仕組みを (ちょこっと)参考にしており、
実際にクラスターを立ち上げ ることなく、 Schedulerの動作を再現する
[前提] Schedulerって? 一文で超簡単にいうと →「PodをどのNodeに配置するのが最適か決めてくれるやつ」 https://kubernetes.io/ja/docs/concepts/scheduling-eviction/kube-scheduler/
Kubernetes のコンポーネント図 引用: https://kubernetes.io/ja/docs/concepts/overview/components/
どうやってパフォーマンス計測してるの? 結論: /test/integration/scheduler_perf にパフォーマンスを確認できるテストがある https://github.com/kubernetes/kubernetes/tree/master/test/integration/scheduler_p erf
scheduler_perf のモチベーション Kubemarkのセットアップが大変 (README の方法で行くとGCE上でのセットアップが必要になる) → “Schedulerのみのパフォーマンス計測”であれば全てのコンポーネントは必要ない → 必要なコンポーネントのみを実行しよう -
api server (+ etcd) - scheduler - PV controller
scheduler_perf のモチベーション ↓こんな感じでmakeから一発で実行できる
scheduler_perf のモチベーション こんな感じでworkloadを定義してパフォーマ ンスを計測できる → - Node作成 - Namespace作成 -
Pod作成 などの動作をさせることが可能
Schedulerに必要なコンポーネント /test/integration/scheduler_perf/util.goのmustSetupScheduler で必要なコンポーネントをセットアップしています
Schedulerに必要なコンポーネント 1. Scheduler 主役なので当然必要。 /test/integration/util/util.goのStartSchedulerでscheduler.Newを直接呼び出して立ち 上げる
Schedulerに必要なコンポーネント 1. Scheduler 2. api-server(+ etcd) 流石に必要。etcdは/hack/install-etcd.shを使用してinstallし、テストの実行の際に立ち 上げる。 (テスト実行前に/hack/lib/etcd.shのkube::etcd::start()でインストールしたetcdを立ち上 げている)
APIサーバーは/test/integration/util/util.goのStartApiserverに立ち上げる。
Schedulerに必要なコンポーネント 1. Scheduler 2. api-server(+ etcd) schedulerはEventHandlerを用いてPodやNodeなどの作成を見張っている。 Podが作成されるとそれを検知して、スケジュール待ちのキューに入れる → api-serverさえあればScheduleを開始することは可能
Schedulerに必要なコンポーネント 1. Scheduler 2. api-server(+ etcd) 3. PV controller PV,
PVCに関係するplugin(volumebinding)が存在するため必要 本物のPV controllerを使用する代わりに、Schedulerに必要なロジックのみを簡単に表 現したFakePVControllerを使用している (/test/integration/util/util.goのStartFakePVControllerで立ち上げている)
まとめ - Kubernetesには、Kubemarkとは別にschedulerのパフォーマンスを計測するため のscheduler_perfというテストが存在する。 - scheduler_perfではクラスターを全て立ち上げるのではなく、スケジューラーにとっ て必要なコンポーネントのみを立ち上げるように工夫している