server festa 2013 autumn
DESCRIPTION
Lightning Talk slide for Cloud Server Festa 2013 Autumn http://serverfesta.info/TRANSCRIPT
サバフェス2013
12/11/2013
@ijin
ABOUT ME (@IJIN)
•Michael H. Oshita
• Japanese American
• In Japan since 2002
• Software/Infra/Cloud Engineer
• http://ijin.github.io
TOOLS
• dstat
• apache response time
•mysql slow logs
• top
• httperf
ANALYSIS• GET: 47
• POST: 990
BASIC TUNING
• Apache MaxClients
• InnoDB
• APC
BENCHMARKhttperf --server 210.140.145.151 --uri / --num-con 200 --rate 6 -v
BENCHMARKMaxClients tuning
BENCHMARKMaxClients + InnoDB
BENCHMARKMaxClients + InnoDB + APC
BENCHMARKMaxClients + InnoDB + PHP5.5 (Opcache) + APCu
BENCHMARKMaxClients + InnoDB + PHP5.5 (Opcache) + APCu
BENCHMARKMaxClients + InnoDB + PHP5.5 (Opcache) + APCu
BENCHMARKHAProxy
BENCHMARKVarnish
HAProxy rate 80:Reply rate [replies/s]: min 63.6 avg 70.5 max 77.0 stddev 6.7 (3 samples)Reply time [ms]: response 693.5 transfer 51.1Reply size [B]: header 228.0 content 48007.0 footer 2.0 (total 48237.0)Reply status: 1xx=0 2xx=1200 3xx=0 4xx=0 5xx=0
Varnish rate 100:Reply rate [replies/s]: min 98.8 avg 99.7 max 100.0 stddev 0.6 (4 samples)Reply time [ms]: response 13.3 transfer 39.6Reply size [B]: header 342.0 content 48012.0 footer 0.0 (total 48354.0)Reply status: 1xx=0 2xx=2000 3xx=0 4xx=0 5xx=0
ARCHITECTUREVarnish
Varnish, MySQLWeb, PHP
Web, PHP
Web, PHP
Web, PHP
BENCHMARKVarnish
BENCHMARK POSThttperf --server 210.140.145.151
--add-header="Content-Type: application/x-www-form-urlencoded\n" --wsesslog 20,2,svpost -v --rate 2
MORE TUNING
• nginx
• php fpm
ARCHITECTUREVarnish + LVS (DSR)
LVS, MySQLVarnish, Web, PHP
Varnish, Web, PHP
Varnish, Web, PHP
Varnish, Web, PHP
cache clear
BENCHMARKVarnish + LVS (DSR)
ARCHITECTUREVarnish + LVS (DSR) + lua + memcached
LVS, MySQL, lua + memcached
Varnish, Web, PHP
Varnish, Web, PHP
Varnish, Web, PHP
Varnish, Web, PHP
cache clear
BENCHMARKVarnish + LVS (DSR) + lua + memcached