Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
コンテナをたくさん詰め込んだシステムとランタイムの変化
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Hiroaki Mizuguchi
December 16, 2024
Programming
380
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
コンテナをたくさん詰め込んだシステムとランタイムの変化
10年近くコンテナを利用したシステムを運用してコンテナランタムの使い方がどのように変化してきたのか取り上げます
Hiroaki Mizuguchi
December 16, 2024
Other Decks in Programming
See All in Programming
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
240
海上で動くGoサーバー: goroutineとchannelでさばく航行データストリーム
atsuki_seo
0
1k
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
200
手動確認はもう限界 〜XCUITestでCustom URL Schemeの遷移を起動種別ごとに自動テストする〜 / Testing Custom URL Schemes with XCUITest
otouto
0
370
巨大モノリシックアプリ モダン化大作戦
ktcryomm
1
1.2k
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.7k
SREの越境 / SRE Collaboration
y0hgi
2
290
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
290
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
3.1k
AGENTS.md Is Not Enough:Build Skills, Don't Download Them
lx_t
0
130
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
310
Simple Storage Service(S3) is not simple
iwatsukayura
0
120
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Between Models and Reality
mayunak
4
480
GraphQLとの向き合い方2022年版
quramy
50
15k
YesSQL, Process and Tooling at Scale
rocio
174
15k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
510
Google's AI Overviews - The New Search
badams
0
1.6k
Chasing Engaging Ingredients in Design
codingconduct
0
340
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
The SEO identity crisis: Don't let AI make you average
varn
0
570
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
410
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
200
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のような高度なリソース管理機能が要らないならおすすめ