Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Linuxのメモリ管理入門
Search
Satoru Takeuchi
PRO
September 17, 2022
Technology
1
390
Linuxのメモリ管理入門
以下動画のテキストです。
https://youtu.be/ncHq6xgLkZs
Satoru Takeuchi
PRO
September 17, 2022
Tweet
Share
More Decks by Satoru Takeuchi
See All by Satoru Takeuchi
eBPF
sat
PRO
1
97
waruiBPF
sat
PRO
0
94
eBPFとwaruiBPF
sat
PRO
4
2.8k
Pythonのコードの気になる行でスタックトレースを出す
sat
PRO
0
89
ソースコードを読むときの思考プロセスの例 ~markdownのレンダリング方法を知りたかった2 markdownパッケージ~
sat
PRO
0
180
様々なファイルシステム
sat
PRO
0
330
ソースを読む時の思考プロセスの例-MkDocs
sat
PRO
1
410
ソースを読むプロセスの例
sat
PRO
22
17k
メモリマップトファイル
sat
PRO
1
170
Other Decks in Technology
See All in Technology
MariaDB Connector/C のcaching_sha2_passwordプラグインの仕様について
boro1234
0
1k
まだ間に合う! Agentic AI on AWSの現在地をやさしく一挙おさらい
minorun365
17
2.8k
子育てで想像してなかった「見えないダメージ」 / Unforeseen "hidden burdens" of raising children.
pauli
2
330
Kiro を用いたペアプロのススメ
taikis
4
1.8k
AgentCoreとStrandsで社内d払いナレッジボットを作った話
motojimayu
1
970
Building Serverless AI Memory with Mastra × AWS
vvatanabe
0
590
オープンソースKeycloakのMCP認可サーバの仕様の対応状況 / 20251219 OpenID BizDay #18 LT Keycloak
oidfj
0
180
Microsoft Agent Frameworkの可観測性
tomokusaba
1
110
アプリにAIを正しく組み込むための アーキテクチャ── 国産LLMの現実と実践
kohju
0
230
20251203_AIxIoTビジネス共創ラボ_第4回勉強会_BP山崎.pdf
iotcomjpadmin
0
140
20251219 OpenIDファウンデーション・ジャパン紹介 / OpenID Foundation Japan Intro
oidfj
0
500
Oracle Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
1
410
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
698
190k
Applied NLP in the Age of Generative AI
inesmontani
PRO
3
2k
The Invisible Side of Design
smashingmag
302
51k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
2
66
Building an army of robots
kneath
306
46k
Paper Plane (Part 1)
katiecoart
PRO
0
2.1k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
280
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
0
1.8k
The Language of Interfaces
destraynor
162
25k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
250
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
115
93k
Six Lessons from altMBA
skipperchong
29
4.1k
Transcript
Linuxのメモリ管理入門 Sep. 17th, 2022 Satoru Takeuchi twitter: satoru_takeuchi
マシンの物理メモリはカーネル&全プロセス共有 マシンの全メモリ 空きメモリ プロセス0 のメモリ プロセス1 のメモリ カーネルのメモリ プロセスn のメモリ
… 物理メモリを管理して各プロセスにメモリを割り当てる
freeコマンドでうちわけがわかる total プロセスが使用中 free カーネルが使用中 解放可能 解放不可能 buff/cache (バッファキャッシュ& ページキャッシュ)
used = total - free - buff/cache available
大事なところだけ抜粋 total プロセスが使用中 free カーネルが使用中 解放可能 解放不可能 available
空きメモリが減ってくると… total プロセスが使用中 free カーネルが使用中 解放可能 解放不可能 available せまくてつらい
カーネルの解放可能メモリを解放 total プロセスが使用中 free カーネルが使用中 解放不可能 available つらくなくなった 解放可能
📝 メモリ使用量についてもっと細かく知りたければ • /proc/meminfoにメモリ使用量のさらに詳しいうちわけがわかる • カーネルの知識がないと理解が大変 • 興味があればman procfsの説明を見てね
まとめ 物理メモリはカーネルが管理し、カーネルとプロセスが共用 freeコマンドを使えば物理メモリ使用量のだいたいの内訳がわかる メモリが減ってきたら解放可能メモリを解放する freeフィールドに騙されずにavailableフィールドを見よう もっと知りたければ/proc/meminfoを見よう