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
CakePHP3アプリを徹底チューニングしてみた
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Tsuyoshi Sadakata
June 12, 2017
Programming
5
2.7k
CakePHP3アプリを徹底チューニングしてみた
2017/06/10 @ PHPカンファレンス福岡 2017
Tsuyoshi Sadakata
June 12, 2017
Tweet
Share
Other Decks in Programming
See All in Programming
CSC307 Lecture 02
javiergs
PRO
1
780
Apache Iceberg V3 and migration to V3
tomtanaka
0
170
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
390
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
1k
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
210
dchart: charts from deck markup
ajstarks
3
1k
ノイジーネイバー問題を解決する 公平なキューイング
occhi
0
110
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
SourceGeneratorのススメ
htkym
0
200
CSC307 Lecture 04
javiergs
PRO
0
660
並行開発のためのコードレビュー
miyukiw
0
1k
Featured
See All Featured
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
130
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
430
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
57
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
55
Git: the NoSQL Database
bkeepers
PRO
432
66k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Become a Pro
speakerdeck
PRO
31
5.8k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
300
Navigating Weather and Climate Data
rabernat
0
110
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
240
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
66
37k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Transcript
貞方毅(@sadapon2008) PHPカンファレンス福岡2017
貞方 毅(さだかた つよし) 所属: 株式会社Fusic 技術開発部門 基盤ユニット
サーバサイドエンジニア Twitter/Github: @sadapon2008 PHPカンファレンス福岡2017 2
$ composer create-project --prefer-dist cakephp/app blog PHPカンファレンス福岡2017 3
$ composer create-project --prefer-dist cakephp/app blog パフォーマンスのチューニングしてますか? PHPカンファレンス福岡2017 4
CakePHP3公式チュートリアル: ブログチュートリアル シンプルなCRUD VPS 2CPU RAM 1GB想定のVMで負荷テスト
CentOS7+Apache 2.4+PHP7(mod_php)+MySQL5.7 一覧画面に負荷テストツールSiegeで計測 約 267 trans/sec PHPカンファレンス福岡2017 5
コアのキャッシュをファイルキャッシュからAPCuの メモリキャッシュに変更 config/app.php ページネーションのクエリにAPCuのクエリキャッ シュを適用 ※1
CakePHP3のクエリキャッシュはかなり癖あり ※2 Qiita「CakePHP3で簡単にFileCacheからfindで きるようにするプラグイン」 約 267 trans/sec Before PHPカンファレンス福岡2017 6
PHPカンファレンス福岡2017 コアのキャッシュをファイルキャッシュからAPCuの メモリキャッシュに変更 config/app.php ページネーションのクエリにAPCuのクエリキャッ シュを適用
※1 CakePHP3のクエリキャッシュはかなり癖あり ※2 Qiita「CakePHP3で簡単にFileCacheからfindで きるようにするプラグイン」 約 267 trans/sec Before 約 280 trans/sec After 7
ここでもメモリキャッシュのAPCuを活用 $ composer create-project dump-autoload --optimize --apcu 約 280
trans/sec Before PHPカンファレンス福岡2017 8
ここでもメモリキャッシュのAPCuを活用 $ composer create-project dump-autoload --optimize --apcu 約 280
trans/sec Before 約 329 trans/sec After PHPカンファレンス福岡2017 9
使用しないmod_*をコメントアウトしてメモリ節約 StartServers,MaxClients等を64に固定 約 329 trans/sec Before PHPカンファレンス福岡2017 10
使用しないmod_*をコメントアウトしてメモリ節約 StartServers,MaxClients等を64に固定 約 329 trans/sec Before 約 355
trans/sec After PHPカンファレンス福岡2017 11
約 267 trans/sec 約 280 trans/sec 約 329 trans/sec 約
355 trans/sec PHPカンファレンス福岡2017 12
約 267 trans/sec 約 280 trans/sec 約 329 trans/sec 約
355 trans/sec 約 33% UP PHPカンファレンス福岡2017 13
約 267 trans/sec 約 280 trans/sec 約 329 trans/sec 約
355 trans/sec 約 33% UP PHPカンファレンス福岡2017 14 チューニングネタ是非共有してください!
ReactPHP+CakePHP3 PSR-7を活用 Application::bootstrap()をリクエスト間で共有し て高速化できるかも? PHPカンファレンス福岡2017 15
PHPカンファレンス福岡2017 16