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
AHC045_解説
shun_pi
0
510
フロントエンドテストの育て方
quramy
11
3k
RuboCop: Modularity and AST Insights
koic
1
170
Making TCPSocket.new "Happy"!
coe401_
1
250
Code smarter, not harder - How AI Coding Tools Boost Your Productivity | Webinar 2025
danielsogl
0
120
AI Agents with JavaScript
slobodan
0
220
Youtube Lofier - Chrome拡張開発
ninikoko
0
2.4k
メモリウォールを超えて:キャッシュメモリ技術の進歩
kawayu
0
1.9k
Do Dumb Things
mitsuhiko
0
430
Building Scalable Mobile Projects: Fast Builds, High Reusability and Clear Ownership
cyrilmottier
2
270
State of Namespace
tagomoris
4
970
Going Structural with Named Tuples
bishabosha
0
200
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
183
22k
How to Ace a Technical Interview
jacobian
276
23k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
9
740
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.3k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.8k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Embracing the Ebb and Flow
colly
85
4.6k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
227
22k
Into the Great Unknown - MozCon
thekraken
37
1.7k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
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