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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Satoru Takeuchi
PRO
December 29, 2020
Technology
430
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
Transcript
6 slides
バッファキャッシュ 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
More Decks by Satoru Takeuchi
See All by Satoru Takeuchi
Btrfsのsnapshotとランダム書き込み
sat
PRO
0
47
ファイルシステムのデフラグ
sat
PRO
1
47
コピーオンライト型ファイルシステムと ランダム書き込み
sat
PRO
2
120
119-多機能ファイルシステムBtrfs_のコピー.pdf
sat
PRO
1
87
Linuxカーネルの インタフェースは変わりうる?
sat
PRO
1
120
あなたの知らないバージョン命名規則
sat
PRO
3
940
Rook: Intro and Deep Dive with Ceph
sat
PRO
1
85
Machine Check Exception
sat
PRO
2
77
バイナリダンプの模様を読む
sat
PRO
0
120
Other Decks in Technology
See All in Technology
こんなに変わった! AWSネットワークの常識
shotashiratori
15
9.4k
[関西Kaggler会 20261113] 続・コミュニティコンペのススメ
nejumi
0
130
CloudTrail を推したい
kazzpapa3
1
130
RAGの改善を速く回すための評価基盤
yosukeyoshida
4
1.9k
並列度を下げたら速くなった — go build の重複コンパイルを実測で見る
tomoaki25
2
1.3k
目を覚ませ!僕らの認証情報が何者かに侵略されてるぞ
tkito
2
440
gem install とrequire のむこうがわ
ydah
0
150
少ない人手 限られた予算 それでも守る 消せない・見つける・戻れる オールハザード型BCP on AWS / 20261107 Mitsutoshi Matsuo
shift_evolve
PRO
0
410
狙われているAPIの脆弱性!今こそ手をつけるべき根本的な対策とは?
nagix
0
150
異夢同船〜異なる夢でも同じ船でなんとかする〜
fortegp05
1
490
田んぼの見回りをIoTで減らしたい!水位監視から電池駆動カメラまでの試行錯誤
itosoft
1
260
LLM 基盤と kagent v0 を全部 k8s に入れてみた / Deploy both LLM and kagent v0 in k8s
kota2and3kan
0
230
Featured
See All Featured
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
470
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.9k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.2k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
560
BBQ
matthewcrist
90
10k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
The Curious Case for Waylosing
cassininazir
1
610
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.3k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Bash Introduction
62gerente
615
220k
How to Ace a Technical Interview
jacobian
280
24k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
1
300