Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ページキャッシュの性能への影響
Search
Satoru Takeuchi
PRO
December 21, 2020
Technology
0
160
ページキャッシュの性能への影響
以下動画のテキストです。
https://youtu.be/Nx1AnkrUdoE
Satoru Takeuchi
PRO
December 21, 2020
Tweet
Share
More Decks by Satoru Takeuchi
See All by Satoru Takeuchi
Rook: Intro and Deep Dive With Ceph
sat
PRO
1
89
会社員しながら本を書いてきた知見の共有
sat
PRO
3
770
デバイスにアクセスするデバイスファイル
sat
PRO
1
32
ファイルシステムのデータを ブロックデバイスへの操作で変更
sat
PRO
1
28
デバイスドライバ
sat
PRO
0
45
マルチスレッドの実現方法 ~カーネルスレッドとユーザスレッド~
sat
PRO
2
110
共有メモリ
sat
PRO
3
67
マルチスレッドプログラム
sat
PRO
3
56
Linuxのブートプロセス initramfs編
sat
PRO
2
76
Other Decks in Technology
See All in Technology
標準技術と独自システムで作る「つらくない」SaaS アカウント管理 / Effortless SaaS Account Management with Standard Technologies & Custom Systems
yuyatakeyama
3
1.2k
Liquid Glass革新とSwiftUI/UIKit進化
fumiyasac0921
0
160
データプラットフォーム技術におけるメダリオンアーキテクチャという考え方/DataPlatformWithMedallionArchitecture
smdmts
5
610
~宇宙最速~2025年AWS Summit レポート
satodesu
1
1.7k
Prox Industries株式会社 会社紹介資料
proxindustries
0
260
Agentic DevOps時代の生存戦略
kkamegawa
1
1.3k
急成長を支える基盤作り〜地道な改善からコツコツと〜 #cre_meetup
stefafafan
0
110
BigQuery Remote FunctionでLooker Studioをインタラクティブ化
cuebic9bic
2
240
Witchcraft for Memory
pocke
1
210
AWS アーキテクチャ作図入門/aws-architecture-diagram-101
ma2shita
29
10k
Amazon ECS & AWS Fargate 運用アーキテクチャ2025 / Amazon ECS and AWS Fargate Ops Architecture 2025
iselegant
16
5.3k
Model Mondays S2E02: Model Context Protocol
nitya
0
210
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
35
2.3k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
The Invisible Side of Design
smashingmag
299
51k
Documentation Writing (for coders)
carmenintech
71
4.9k
Into the Great Unknown - MozCon
thekraken
39
1.9k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
It's Worth the Effort
3n
185
28k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
Music & Morning Musume
bryan
46
6.6k
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