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
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
AIエージェントによるテストフレームワーク Arbigent
takahirom
0
250
2025年のz-index設計を考える
tak_dcxi
13
5.2k
TypeScript Language Service Plugin で CSS Modules の開発体験を改善する
mizdra
PRO
3
2.2k
Language Server と喋ろう – TSKaigi 2025
pizzacat83
2
600
Interface vs Types ~型推論が過多推論~
hirokiomote
1
220
鯛変だったRubyKaigi 2025 ── それでも楽しかった!
pndcat
0
130
primeNumberでのRBS導入の現在 && RBS::Traceでinline RBSを拡充してみた
mnmandahalf
0
240
技術的負債と戦略的に戦わざるを得ない場合のオブザーバビリティ活用術 / Leveraging Observability When Strategically Dealing with Technical Debt
yoshiyoshifujii
0
160
TypeScript だけを書いて Tauri でデスクトップアプリを作ろう / Tauri with only TypeScript
tris5572
2
500
漸進。
ssssota
0
250
生成AI時代のフルスタック開発
kenn
9
2.2k
バランスを見極めよう!実装の意味を明示するための型定義 TSKaigi 2025 Day2 (5/24)
whatasoda
2
760
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
46
14k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Producing Creativity
orderedlist
PRO
346
40k
Rails Girls Zürich Keynote
gr2m
94
13k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3k
Designing for humans not robots
tammielis
253
25k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
1
68
Raft: Consensus for Rubyists
vanstee
137
7k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
19
1.2k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
12k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.8k
It's Worth the Effort
3n
184
28k
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