mirror of
https://github.com/php/presentations.git
synced 2026-03-24 15:42:33 +01:00
41 lines
1.7 KiB
XML
41 lines
1.7 KiB
XML
<slide>
|
|
<title>Is it my code that is slow?</title>
|
|
|
|
<div effect="fade-out">
|
|
<blurb>Multiple possible reasons:</blurb>
|
|
<list>
|
|
<bullet>The retrieval from a database is slow</bullet>
|
|
<bullet>There is lots of IO</bullet>
|
|
<bullet>Your code is slow</bullet>
|
|
<bullet>The system is busy with other things</bullet>
|
|
<bullet>And don't forget front-end performance</bullet>
|
|
</list>
|
|
</div>
|
|
|
|
<div effect="fade-in-out">
|
|
<blurb>%$ vmstat 1%</blurb>
|
|
<code>
|
|
procs memory swap io system cpu
|
|
r b swpd free buff cache si so bi bo in cs *|dd1111|us sy|* id wa
|
|
5 0 121248 367520 767824 3080668 0 0 11272 0 1593 5540 *|dd1111|74 22|* 3 0
|
|
5 0 121248 290784 767960 3082980 0 0 268 0 1555 5381 *|dd1111|77 20|* 3 0
|
|
5 0 121248 238340 768132 3084336 0 0 1364 21160 2263 6815 *|dd1111|70 21|* 3 7
|
|
6 0 121248 170772 768300 3087100 0 0 1652 0 1802 8540 *|dd1111|71 25|* 4 0
|
|
</code>
|
|
<blurb>CPU is (close to) fully in use: *|dd1111|74 + 22|* ➔ your *code* is slow.</blurb>
|
|
</div>
|
|
|
|
<div effect="fade-in-out">
|
|
<blurb>%$ vmstat 1%</blurb>
|
|
<code>
|
|
procs memory swap io system cpu
|
|
r b swpd free buff cache si so bi bo in cs us sy id *|dd1111|wa|*
|
|
0 1 121248 50776 314796 4156000 0 0 245800 0 3018 5394 1 11 71 *|dd1111|17|*
|
|
1 0 121248 52112 315108 4236692 0 0 243672 0 3107 5552 1 10 71 *|dd1111|18|*
|
|
1 1 121248 50148 315256 4318268 0 0 243096 44 3146 5463 1 11 72 *|dd1111|17|*
|
|
1 1 121248 52120 315484 4396356 0 0 243784 0 3006 5419 1 10 72 *|dd1111|18|*
|
|
</code>
|
|
<blurb>*wa*it is > 10 ➔ IO is the bottleneck.</blurb>
|
|
</div>
|
|
</slide>
|