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 21, 2020
Technology
190
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ページキャッシュの性能への影響
以下動画のテキストです。
https://youtu.be/Nx1AnkrUdoE
Satoru Takeuchi
PRO
December 21, 2020
More Decks by Satoru Takeuchi
See All by Satoru Takeuchi
119-多機能ファイルシステムBtrfs_のコピー.pdf
sat
PRO
1
70
Linuxカーネルの インタフェースは変わりうる?
sat
PRO
1
97
あなたの知らないバージョン命名規則
sat
PRO
3
910
Rook: Intro and Deep Dive with Ceph
sat
PRO
1
64
Machine Check Exception
sat
PRO
2
67
バイナリダンプの模様を読む
sat
PRO
0
91
cpコマンドはディスク上でデータを コピーしないことがある
sat
PRO
3
91
114-ファイルのshallow_copy.pdf
sat
PRO
2
58
113-Btrfsのスナップショット.pdf
sat
PRO
0
41
Other Decks in Technology
See All in Technology
2026-09-18 gotanda.sre Terraformで複数環境作ったり、複数Stateに分割したりそれとTerragrunt / Terraform multi envs and multi states
masasuzu
4
750
行動するAIのためのオントロジー | DevRev — Encraft #26.pdf
dvrv_tknrszk
1
240
AIエージェント時代のPlatform as a Product —— テックリードがPdMとして回す発見・導入・計測 / Platform as a Product in the AI Agent Era
toshi0607
1
350
Azure Copilot Resiliency Agentをいろいろ試してみる
tomokusaba
0
110
Making AI Agents Safe and Fast- Jev, Obsidian, and the Meta-Harness
x5gtrn
PRO
0
150
GoのInterface内部構造から学ぶ!最高パフォーマンスを出すコード設計
yappli_developers
1
300
Amazon Bedrock Agents ClassicからAmazon Bedrock AgentCoreへ移行した際、ガードレール設定が2箇所に割れた話
matsunobu
0
120
PQC移行の今 -- IETF からみた現在地
satokan
4
480
音声コミュニティを守るAI監視基盤_ 90%以上の入力削減を支えたServerless設計と運用判断
shuheioka123
0
110
[Kiro Meetup #7] Kiro Crew Dive Deep
konippi
0
370
作って終わりじゃないサーバーレス 〜9年運用する大規模EC物流API基盤の設計・運用のリアル〜
zozotech
PRO
0
550
AIに任せた品質は、誰が見立てるのか - AI時代のテストマネジメント
nakanao
3
3.2k
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
Test your architecture with Archunit
thirion
2
2.4k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
Raft: Consensus for Rubyists
vanstee
142
7.7k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
We Are The Robots
honzajavorek
0
380
How to Think Like a Performance Engineer
csswizardry
28
2.8k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Believing is Seeing
oripsolob
1
230
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.1k
The Pragmatic Product Professional
lauravandoore
37
7.5k
Transcript
ページキャッシュの 性能への影響 Dec 21, 2020 Satoru Takeuchi Twitter: satoru_takeuchi, EnSatoru
1
ページキャッシュおさらい • ストレージデバイスへのアクセス速度はメモリアクセス速度より遅い • その速度差を埋めるのがページキャッシュ • ストレージデバイスのデータをメモリ上にキャッシュ 2
実験 • ページキャッシュの有無による書き込み速度の変化を測定 • 手順 1. ページキャッシュを使って 1GBのファイルを作る速度 (スループット)を計測 ▪
dd if=/dev/zero of=test bs=1M count=1K 2. ファイルを消す ▪ rm test 3. ページキャッシュに加えてディスクにも書き出すモードで 1GBのファイルを作る速度を計測 ▪ dd if=/dev/zero of=test bs=1M count=1K oflag=sync ▪ syncは意図的にページキャッシュだけではなくディスクにも書き込むフラグ • 注意 ◦ 物理マシン上でやる。仮想マシン上では結果が変わることがある 3
結果 • 1回目の速度 > 2回目の速度 4 一回目 二回目 メモリ(速い) ディスク(遅い)
メモリ(速い) ディスク(遅い) 1) 書く 1) 書く 2) 書く
実験 • ページキャッシュの有無による読み出し速度の変化を測定 • 手順 1. ファイルを読み出して速度を計測 ▪ dd if=test
of=/dev/null bs=1M 2. システムのページキャッシュを削除 ▪ root権限でecho 3 >/proc/sys/vm/drop_caches 3. もう一度ファイルを読み出して速度を計測 ▪ dd if=test of=/dev/null bs=1M • 注意 ◦ 物理マシン上でやる。仮想マシン上では結果が変わることがある 5
結果 • 1回目の速度 > 2回目の速度 6 一回目 二回目 メモリ(速い) ディスク(遅い)
メモリ(速い) ディスク(遅い) 1) 読む 1) 読む 2) 読む
まとめ • ページキャッシュを使うとストレージへの見かけ上の読み書き速度が上がる 7