Slide 13
Slide 13 text
新規Railsアプリケーションをチューニング
13
- Rackミドルウェアを可能な限り削除
(ActionDispatch::HostAuthorization, Rack::Sendfile, ActionDispatch::Static,
ActionDispatch::ServerTiming, Rails::Rack::Logger, ActionDispatch::RequestId, ActionDispatch::RemoteIp, ActionDispatch::ShowExceptions, ActionDispatch::DebugExceptions,
ActionDispatch::ActionableExceptions, ActionDispatch::Reloader, ActionDispatch::Callbacks, Rack::ETag, Rack::Head, Rack::Runtime, Rack::ConditionalGet, ActionDispatch::Executor
)
- Puma: 1 process, 2 threadsに調整
- 11071.26 requests/sec -> 38倍
$ wrk -t5 -d10s -s wrk.lua http://localhost:3000
Running 10s test @ http://localhost:3000
5 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 14.11ms 18.67ms 62.85ms 78.87%
Req/Sec 2.23k 622.10 3.08k 46.40%
111464 requests in 10.07s, 32.56MB read
Requests/sec: 11071.26
Transfer/sec: 3.23MB