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
個人アプリを2年ぶりにアプデしたから褒めて / I just updated my personal app, praise me!
lovee
0
350
Software Architecture
hschwentner
6
2.1k
楽しく向き合う例外対応
okutsu
0
120
バックエンドのためのアプリ内課金入門 (サブスク編)
qnighy
8
1.8k
Introduction to kotlinx.rpc
arawn
0
700
GitHub Actions × RAGでコードレビューの検証の結果
sho_000
0
260
Flutter × Firebase Genkit で加速する生成 AI アプリ開発
coborinai
0
160
2,500万ユーザーを支えるSREチームの6年間のスクラムのカイゼン
honmarkhunt
6
5.3k
JavaScriptツール群「UnJS」を5分で一気に駆け巡る!
k1tikurisu
9
1.8k
WebDriver BiDiとは何なのか
yotahada3
1
140
Ruby on cygwin 2025-02
fd0
0
150
なぜイベント駆動が必要なのか - CQRS/ESで解く複雑系システムの課題 -
j5ik2o
10
3.6k
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
410
Designing for humans not robots
tammielis
250
25k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
174
51k
Thoughts on Productivity
jonyablonski
69
4.5k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.2k
Building Applications with DynamoDB
mza
93
6.2k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.2k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
Building a Scalable Design System with Sketch
lauravandoore
461
33k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
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