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
プロセスへのメモリ割り当て4 - 実際に使うときにメモリを獲得するデマンドページング(実践編)
Search
Satoru Takeuchi
PRO
July 19, 2024
Technology
1
270
プロセスへのメモリ割り当て4 - 実際に使うときにメモリを獲得するデマンドページング(実践編)
以下動画のテキストです。
https://youtu.be/GwLZaMPhInM
Satoru Takeuchi
PRO
July 19, 2024
Tweet
Share
More Decks by Satoru Takeuchi
See All by Satoru Takeuchi
eBPF
sat
PRO
1
100
waruiBPF
sat
PRO
0
100
eBPFとwaruiBPF
sat
PRO
5
3.2k
Pythonのコードの気になる行でスタックトレースを出す
sat
PRO
0
90
ソースコードを読むときの思考プロセスの例 ~markdownのレンダリング方法を知りたかった2 markdownパッケージ~
sat
PRO
0
180
様々なファイルシステム
sat
PRO
0
330
ソースを読む時の思考プロセスの例-MkDocs
sat
PRO
1
420
ソースを読むプロセスの例
sat
PRO
22
18k
メモリマップトファイル
sat
PRO
1
170
Other Decks in Technology
See All in Technology
AWSに革命を起こすかもしれない新サービス・アップデートについてのお話
yama3133
0
520
AgentCoreとStrandsで社内d払いナレッジボットを作った話
motojimayu
1
1.1k
[Neurogica] 採用ポジション/ Recruitment Position
neurogica
1
140
AIエージェントを5分で一気におさらい!AIエージェント「構築」元年に備えよう
yakumo
1
120
TED_modeki_共創ラボ_20251203.pdf
iotcomjpadmin
0
170
Entity Framework Core におけるIN句クエリ最適化について
htkym
0
130
MariaDB Connector/C のcaching_sha2_passwordプラグインの仕様について
boro1234
0
1.1k
Agentic AIが変革するAWSの開発・運用・セキュリティ ~Frontier Agentsを試してみた~ / Agentic AI transforms AWS development, operations, and security I tried Frontier Agents
yuj1osm
0
110
Autonomous Database - Dedicated 技術詳細 / adb-d_technical_detail_jp
oracle4engineer
PRO
5
11k
AWSインフルエンサーへの道 / load of AWS Influencer
whisaiyo
0
240
20251218_AIを活用した開発生産性向上の全社的な取り組みの進め方について / How to proceed with company-wide initiatives to improve development productivity using AI
yayoi_dd
0
790
20251219 OpenIDファウンデーション・ジャパン紹介 / OpenID Foundation Japan Intro
oidfj
0
550
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
260
Marketing to machines
jonoalderson
1
4.5k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
115
95k
How to train your dragon (web standard)
notwaldorf
97
6.5k
Everyday Curiosity
cassininazir
0
110
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
200
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Context Engineering - Making Every Token Count
addyosmani
9
560
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
So, you think you're a good person
axbom
PRO
0
1.9k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
Transcript
プロセスへのメモリ割り当て(4) 実際に使うときにメモリを獲得する デマンドページング(実践編) Jul. 19th, 2024 Satoru Takeuchi X: satoru_takeuchi
1
はなすこと • これまでに学んだこと ◦ Linuxはデマンドページング方式でプロセスにメモリを割り当てる • 実際にそうなることを実験で確認 • 実験環境 ◦
Ubuntu 22.04.4 LTS ◦ kernel 5.15.0-107-generic 2
実験プログラム • demand-paging.py ◦ mmapを呼び出して100MiBのメモリを獲得 ◦ 1秒に1回、先頭から順番に 10MiBづつ、合計100MiBの領域にアクセス 3 仮想アドレス空間
1. 100MiBの領域をmmap 2. 先頭10MiBにアクセス 3. 次の10MiBにアクセス …
実験中に別端末でメモリ関連の統計情報を見る • sar -r 1 ◦ 1秒間に1回メモリ関連統計情報を出力 • 見るべきフィールド ◦
kbmemused: 使用中のメモリ量[KiB] 4
実験中… • 上の端末 ◦ ./demand-paging.py • 下の端末 ◦ sar -r
1 5
まとめ • Linuxがデマンドページング方式でメモリ獲得していることがわかった ◦ mmap発行時にはメモリ使用量は増えない ◦ メモリ使用量が増えるのは実際にメモリアクセスしたとき 6