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
プロセスへのメモリ割り当て4 - 実際に使うときにメモリを獲得するデマンドページング(実践編)
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Satoru Takeuchi
PRO
July 19, 2024
Technology
300
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
プロセスへのメモリ割り当て4 - 実際に使うときにメモリを獲得するデマンドページング(実践編)
以下動画のテキストです。
https://youtu.be/GwLZaMPhInM
Satoru Takeuchi
PRO
July 19, 2024
Transcript
6 slides
プロセスへのメモリ割り当て(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
More Decks by Satoru Takeuchi
See All by Satoru Takeuchi
Btrfsのsnapshotとランダム書き込み
sat
PRO
0
59
ファイルシステムのデフラグ
sat
PRO
1
63
コピーオンライト型ファイルシステムと ランダム書き込み
sat
PRO
2
140
119-多機能ファイルシステムBtrfs_のコピー.pdf
sat
PRO
1
92
Linuxカーネルの インタフェースは変わりうる?
sat
PRO
1
120
あなたの知らないバージョン命名規則
sat
PRO
3
940
Rook: Intro and Deep Dive with Ceph
sat
PRO
1
93
Machine Check Exception
sat
PRO
2
81
バイナリダンプの模様を読む
sat
PRO
0
130
Other Decks in Technology
See All in Technology
対話 AI プラットフォーム「アイブリー」で実践する自然言語処理と事業開発
ivry_presentationmaterials
0
150
Welcome JXL!
dynamis
0
1.1k
自動計装なしでECSサービスをApplication Signalsに載せるまで
ota1022
2
480
セキュリティチームは どのコンテナイメージの脆弱性対応を優先すべきか 〜CISA新指針とSCCで作る脆弱性トリアージ〜
swdtkuy
0
360
認知の質も文化醸成も。数年取り組んで見えてきた技術広報のKPI設計 / Tech PR KPIs: Lessons on Awareness Quality and Culture After Several Years
bitkey
PRO
0
260
その修正で本当に速くなったのか? k6とOpenTelemetryで確かめる性能改善 / Performance review with k6 and OpenTelemetry
ymotongpoo
3
480
AIエージェントのアーキテクチャ設計
nsatoh
0
590
[DBRE Summit 26] DBRE はデータベース運用をどう変えたのか
_awache
0
140
OCI Artifact による自動運転タクシーに向けた OTA 基盤の構築
biwashi
1
300
New Relicのアラート対応をClaude Codeで自動修正するワークフローを作った話
manabuseki
3
740
競馬予想をAIでやってみた話
yoshimura_datam
0
150
AIが学べる子供の夏休みの自由研究教材を作ったが空振りだった話
yoshimura_datam
0
120
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.7k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
1
250
ラッコキーワード サービス紹介資料
rakko
5
6.1M
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
350
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
370
Mind Mapping
helmedeiros
1
460
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
990
A better future with KSS
kneath
240
18k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Leo the Paperboy
mayatellez
11
2.5k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
360