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
51
ファイルシステムのデフラグ
sat
PRO
1
58
コピーオンライト型ファイルシステムと ランダム書き込み
sat
PRO
2
130
119-多機能ファイルシステムBtrfs_のコピー.pdf
sat
PRO
1
90
Linuxカーネルの インタフェースは変わりうる?
sat
PRO
1
120
あなたの知らないバージョン命名規則
sat
PRO
3
940
Rook: Intro and Deep Dive with Ceph
sat
PRO
1
87
Machine Check Exception
sat
PRO
2
78
バイナリダンプの模様を読む
sat
PRO
0
120
Other Decks in Technology
See All in Technology
LLM 基盤と kagent v0 を全部 k8s に入れてみた / Deploy both LLM and kagent v0 in k8s
kota2and3kan
0
240
gradle-best-practices 使ってみた
mikanichinose
0
180
お風呂場をサーバルームにしよう
yusuke427
0
370
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
17
120k
E2E Test というハーネス — AI時代の自動テスト民主化
daishukojima
10
5.9k
SREのためのFinOps入門
muziyoshiz
3
1.7k
認知の質も文化醸成も。数年取り組んで見えてきた技術広報のKPI設計 / Tech PR KPIs: Lessons on Awareness Quality and Culture After Several Years
bitkey
PRO
0
110
PHPで家庭用ゲーム機の専用コントローラーをMIDIデバイスとして扱ってみる
wind111
0
170
市販IoT機器や自作IoT機器とHomeAssistantを駆使して家の電気代をできる限り見える化する方法の考案
harutiro
0
390
人間+AIを「チーム」としてプロセスを再設計する
littlehands
4
3.6k
業務の傍らで進める改善ループエンジニアリング
bengo4com
1
220
Gov-JAWS#9 統合監視機能のマネージドサービス化+AIによる障害時自動調査
fj_yoshimura_kosuke
0
220
Featured
See All Featured
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
470
My Coaching Mixtape
mlcsv
0
390
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
850
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
6
950
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
670
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
310
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2.1k
The Cost Of JavaScript in 2023
addyosmani
56
10k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.8k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
540
4 Signs Your Business is Dying
shpigford
187
23k