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
コンテナをたくさん詰め込んだシステムとランタイムの変化
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Hiroaki Mizuguchi
December 16, 2024
Programming
350
1
Share
コンテナをたくさん詰め込んだシステムとランタイムの変化
10年近くコンテナを利用したシステムを運用してコンテナランタムの使い方がどのように変化してきたのか取り上げます
Hiroaki Mizuguchi
December 16, 2024
Other Decks in Programming
See All in Programming
Building on Bluesky's AT Protocol with Ruby
mackuba
0
100
[RubyKaigi 2026] Require Hooks
palkan
1
290
Explore CoroutineScope
tomoeng11
0
160
いつか誰かが、と思っていた フロントエンド刷新5年間の実践知
kiichisugihara
1
250
GitHubCopilotCLIをはじめよう.pdf
htkym
0
320
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
170
KMP × Kotlin 2.3 - How Android Got Slower While iOS Builds Improved by 47%
rio432
0
120
「Linuxサーバー構築標準教科書」を読んでみた #ツナギメオフライン.7
akase244
0
1.4k
의존성 주입과 모듈화
fornewid
0
160
Structured Concurrency, Scoped Values and Joiners in the JDK 25 26 27
josepaumard
1
140
Vibe NLP for Applied NLP
inesmontani
PRO
0
590
WebAssembly を読み込むベストプラクティス 2026年春版 / Best Practices for Loading WebAssembly (Spring 2026)
petamoriken
5
1k
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
510
Design in an AI World
tapps
1
210
Making the Leap to Tech Lead
cromwellryan
135
9.8k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
360
The Curious Case for Waylosing
cassininazir
0
340
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
How to Ace a Technical Interview
jacobian
281
24k
Amusing Abliteration
ianozsvald
1
160
Google's AI Overviews - The New Search
badams
0
1k
Accessibility Awareness
sabderemane
1
110
Transcript
コンテナをたくさん 詰め込んだシステム とランタイムの変化 HIROAKI MIZUGUCHI INTERNET INITIATIVE JAPAN INC. CONTAINER
RUNTIME MEETUP #6 2024-12-16
自己紹介 名前: 水口 弘明 X: @m_akihiro, Github: akihiro
所属: Internet Initiative Japan Inc. 仕事: ネットワーク監視システムの開発運用、サーバOS周りのコンサルティング
IIJプライベートバックボーンサービス IIJのサービスや他社クラウドを相互接続 できる閉域網を提供 テナントごとに独立した閉域網を多数管理 2013年10月サービス開始
なぜ多数のコンテナを動かすのか? テナント毎にアドレス空間は独立し、テナント間ではアドレスが重複するから Tenant A Tenant B Tenant C Probe
For A Probe For B Probe For C 192.168.0.10 192.168.0.10 192.168.0.10 backend 169.254.0.0/16, fe80::/10 Link-Local Address
2014年 device mapperの導入 Containerのlayered filesystemとしてdevice mapper実装を導入 コンテナの収容に対してdevice mapperがボトルネック
o ブロックデバイスレイヤーで実装 o コンテナ毎にファイルキャッシュが独立 64GBのホストに250テナント/500コンテナを収容 o NetNSを保持するpause+CNI機能を持つ内製したgolang製のコンテナ o 監視サービス用の内製したpython3のコンテナ o 50GBほどのメモリ消費で安定していた Devicemapper Filesystem (file cache) Application
2018年 overlayfsの導入 Runtimeのlayered filesystemとしてoverlayfs実装を採用 同一コンテナイメージならファイルキャッシュが共有される コンテナ内部プログラムの書き換え
NetNS保持コンテナとしてk8sのpauseに置き換え、CNI相当をホスト側へ 監視プログラムをGo言語製に置き換え 96GBのホストに500テナント/1000コンテナを収容 メモリ消費は15GB程度で安定 Filesystem (file cahce) OverlayFS Application
Container Runtimeのfootprint 2014年docker、2018年docker+containerdを採用 コンテナの数に比例してContainer Runtimeのfootprintが問題視 500テナント/1000コンテナのOSのThread数
GoのRuntimeはCPU数程度のスレッドを作る。不足するともっと沢山作る containerd: 1k threads containerd-shim: total 10k threads pauseコンテナ: 500 threads アプリ本体のコンテナ(tini相当+本体): total 20k threads
2024年 daemonlessのpodman daemonlessのpodman+quadletを採用 管理用の常駐プロセス不要 containerd-shim相当のconmonはsingle thread動作
podmanは直接netnsを指定可能 → pauseコンテナ不要 アプリケーションコンテナの設計見直し Zombie reaperをGo製の内製ツールからtini(single thread動作)に変更 1ホスト当たり1000テナント/1000コンテナを収容
非k8s環境でのコンテナ管理 Podman Quadletとsystemdの組み合わせが良い(個人の感想です) Quadletはpodmanのsystemd-generatorとして実装 systemd.service likeな設定ファイルでコンテナ管理できる
Podman quadletとansibleの組み合わせが良い(個人の感想です) Ansibleとpodmanは共にredhatが開発している Podman用のansible roleもメンテナンスされている 沢山のコンテナの設定をjinjaテンプレートで管理できる NRIのような高度なリソース管理機能が要らないならおすすめ