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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Satoru Takeuchi
PRO
December 29, 2020
Technology
420
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
バッファキャッシュ
以下動画のテキストです。
https://youtu.be/pXpVDAqLpHA
Satoru Takeuchi
PRO
December 29, 2020
More Decks by Satoru Takeuchi
See All by Satoru Takeuchi
119-多機能ファイルシステムBtrfs_のコピー.pdf
sat
PRO
1
68
Linuxカーネルの インタフェースは変わりうる?
sat
PRO
1
93
あなたの知らないバージョン命名規則
sat
PRO
3
900
Rook: Intro and Deep Dive with Ceph
sat
PRO
1
64
Machine Check Exception
sat
PRO
2
66
バイナリダンプの模様を読む
sat
PRO
0
89
cpコマンドはディスク上でデータを コピーしないことがある
sat
PRO
3
88
114-ファイルのshallow_copy.pdf
sat
PRO
2
57
113-Btrfsのスナップショット.pdf
sat
PRO
0
40
Other Decks in Technology
See All in Technology
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
3
510
aws-iot-platform-architecture-use-cases.pdf
ma2shita
0
250
[2026-09-11]SREは誰のもの?運用エンジニアが始める 「SRE領域への越境」とチームの進化の軌跡 〜Road to NEXT CRE
tosite
0
290
おい、エージェントを使って終わらせろ
nwiizo
1
590
【技術的負債conf】事業成長に伴う技術的負債の説明責任とAIによるモニタリング、認知的負債について
i35_267
3
1.7k
Snowflakeのコスト最適化を支えるアーキテクチャ設計
ktatsuya
1
1.6k
AIによるクリエイティブ生成を行う上での試行錯誤
plaidtech
PRO
0
160
新機種発売前に見直そう!端末移行で再ログインが要るアプリ・要らないアプリは何が違うのか 〜シームレスに再開できる設計と実装〜
zozotech
PRO
0
200
GoのInterface内部構造から学ぶ!最高パフォーマンスを出すコード設計
yappli_developers
0
120
DEFCON_CHV_CTF_Write-up.pdf
bata_24
0
150
AIエージェントの自己改善をどう設計するか / How to Design Self-Improvement for AI Agents
22mi
25
16k
幾何アルゴリズムで なめらかなピン操作を / iOSDC Japan 2026 / smoothpin
kazumanagano
0
350
Featured
See All Featured
Facilitating Awesome Meetings
lara
57
7.1k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
240
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
240
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
46k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
450
How GitHub (no longer) Works
holman
316
150k
It's Worth the Effort
3n
188
29k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
570
Mobile First: as difficult as doing things right
swwweet
225
10k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Automating Front-end Workflow
addyosmani
1369
210k
Transcript
バッファキャッシュ Dec 29th, 2020 Satoru Takeuchi Twitter: satoru_takeuchi, EnSatoru 1
バッファキャッシュとは • ストレージのデータを一時的にキャッシュしておくしくみ • freeコマンドで出力される”buff/cache”のうちの”buff”のほう • ページキャッシュとの違い ◦ ページキャッシュ: 通常のファイルの中身をキャッシュ
◦ バッファキャッシュ: 上記以外のメタデータをキャッシュ ▪ ブロックデバイスファイルのデータ ▪ inode、ディレクトリの中身 • Btrfsのようにinodeもページキャッシュに置かれるファイルシステムも 2
バッファキャッシュの情報 • freeの”buff/cache”: バッファキャッシュの総量+ページキャッシュの総量(*1) ◦ 通常はほとんどがページキャッシュ • sar -rのkbbuffers(KiB単位) 3
*1) カーネルのslabという領域も含む
実験A: ブロックデバイスのデータをキャッシュ 1. sync & drop_caches 2. sar -r 1
1を実行し、kbbuffersの値を記録 3. ブロックデバイスから1GB読む 4. sar - 1 1を実行し、kbbuffersの値が増えていることを確認 4
実験B: inodeのデータを書き込む 1. sync & drop_caches 2. sar -r 1
1 3. ext4ファイルシステムに一万個の空ファイルを作る 4. sar -r 1 1を実行 5
まとめ • バッファキャッシュはディスクの内容をメモリにキャッシュする • キャッシュの対象となるのは通常のファイルの内容以外のもの ◦ ブロックデバイスファイルの内容 ◦ inode, ディレクトリの内容
• 予告: ページキャッシュとバッファキャッシュ マニアクス(仮) 6