[Catalyst] Resolving performance issues.
Bill Moseley
moseley at hank.org
Tue Apr 25 18:59:42 CEST 2006
This is a question for the sysadmins out there.
My application is running fine on my development machine[1], but when
moved to a Dreamhost dedicated server[1] it's quite slow.
I'm looking for suggestions on what I might use to get some metrics
before talking to Dreamhost about the issue (just saying "It's slow"
is not very persuasive).
My machine can have its load average up at 1 and is still much faster
than the server with load average < 0.1 at start of a request. vmstat
shows no swapping[4], so memory is not an issue it seems.
Not a very telling test, but this does show the relative difference in
speed by using apache's ab.
Just running the test server, not in debug mode or forking with apache
ab with -n 100 -c 1 I see the following. All running on localhost.
Request/second
(we like big numbers!)
Athlon Dreamhost
-------------- -------------
Static content[2] 30.5 6.5
(2264 bytes)
One database 8.6 1.2
access (8230 bytes)
Very complex page[3] 1.5 0.27
The database is currently 7.4 on both machines -- soon to move to
8.1.3 which will help a little.
[1] Some of the basic specs are (most from /etc/cpuinfo and dmesg):
Development Dreamhost Servre
--------------- ----------------------
CPU Athlon XP1800+ Xeon
Mhz 1150.591 1793.936
cache 256KB 512KB
bogomips 2260.99 3565.15
RAM 1GB .5GB
OS Deb Unstable Deb Sarge
Kernel 2.6.6 2.4.28
Tasks 115 214
fs xfs atime ext3 noatime, nodiratime
Tasks is just a quick snapshot of the number of processes top reports.
[2] This is not a question about how to best server static content.
That's putting an open file handle in $c->res->body.
[3] DBI_TRACE output | grep "execute" | wc -l = 59 execute() calls
[4] vmstat during the "Very complex" run on Dreamhost
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
2 0 314100 11508 94372 117756 1 1 6 9 4 7 13 4 83 0
15 0 314100 7540 94392 118236 0 0 240 142 459 850 90 9 0 0
13 0 314100 6544 94392 118292 0 0 28 0 325 835 94 6 0 0
2 0 314100 6868 94444 118420 0 0 64 158 352 965 89 11 0 0
12 0 314100 12092 94452 118708 0 0 148 0 332 1011 87 13 0 0
13 0 314100 10232 94468 118836 0 0 64 112 376 900 88 12 0 0
17 1 314100 6800 94484 119092 0 0 128 44 343 858 90 10 0 0
3 0 314100 11636 94512 119092 0 0 0 20 279 906 87 13 0 0
16 0 314100 11408 94532 119220 0 0 64 112 308 931 90 10 0 0
15 0 314100 10676 94532 119224 0 0 0 0 267 951 84 16 0 0
13 0 314100 9032 94552 119352 0 0 64 160 278 904 87 13 0 0
13 0 314100 10100 94588 119480 0 0 64 64 262 856 86 14 0 0
16 0 314100 9436 94588 119748 0 0 134 0 340 980 87 13 0 0
14 0 314100 6756 94604 119752 0 0 0 112 257 789 81 19 0 0
16 0 314100 5292 94600 119880 14 0 78 0 333 746 85 15 0 0
12 0 314100 11620 94672 119880 0 0 0 190 286 968 85 15 0 0
12 0 314100 11580 94672 120008 0 0 64 0 246 944 86 14 0 0
13 0 314100 7804 94672 120008 0 0 0 0 249 811 83 17 0 0
--
Bill Moseley
moseley at hank.org
More information about the Catalyst
mailing list