Jan
21
2008

CentOS3にPHP5+eAccelerator その3

15分前に、Zend optimizer未導入であることに気付く。

明日はどんな風が吹くか分からないので、今やることにする。

というわけで、Zend Technologiesから持ってきましたよ、ZendOptimizer-3.3.0a-linux-glibc21-i386.tar.gz。

$ gunzip -dc ZendOptimizer-3.3.0a-linux-glibc21-i386.tar.gz | tar xvf -
$ cd ZendOptimizer-3.3.0a-linux-glibc21-i386
# ./install.sh

はい。終了。
先ほどのポストから20分経過。

......errorでつ。

PHP Fatal error: [Zend Optimizer] Zend Optimizer 3.3.0 is incompatible with eAccelerator 0.9.5.2 in Unknown on line 0

あぁ、eAccelerator設定の後ろにZend Optimizerを書けばいいのね。

# vi /etc/php.d/eaccelerator.ini

Ctrl+G,oして


[Zend]
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.0
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.0
zend_optimizer.version=3.3.0a
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so

を追記

OK。

早速ApacheBenchを。

$ ab -n 100 -c 10 http://***.kenji00.com/index.php
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.1 $> apache-2.0 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/

Benchmarking cat.kenji00.com (be patient).....done


Server Software: Apache
Server Hostname: ***.kenji00.com
Server Port: 80

Document Path: /index.php
Document Length: 14343 bytes

Concurrency Level: 10
Time taken for tests: 47.88499 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 1477900 bytes
HTML transferred: 1434300 bytes
Requests per second: 2.12 [#/sec] (mean)
Time per request: 4708.850 [ms] (mean)
Time per request: 470.885 [ms] (mean, across all concurrent requests)
Transfer rate: 30.64 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.6 0 6
Processing: 1602 4602 2817.0 3938 17307
Waiting: 1517 4430 2793.6 3701 17225
Total: 1602 4602 2817.0 3938 17307

Percentage of the requests served within a certain time (ms)
50% 3938
66% 4926
75% 5685
80% 6570
90% 8583
95% 10652
98% 13889
99% 17307
100% 17307 (longest request)

遅くなってるやん。orz

あ!未だCacheされてないからだ!

もう一度。

$ ab -n 100 -c 10 http://***.kenji00.com/index.php
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.1 $> apache-2.0 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/

Benchmarking cat.kenji00.com (be patient).....done


Server Software: Apache
Server Hostname: ***.kenji00.com
Server Port: 80

Document Path: /index.php
Document Length: 14343 bytes

Concurrency Level: 10
Time taken for tests: 46.674345 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 1477900 bytes
HTML transferred: 1434300 bytes
Requests per second: 2.14 [#/sec] (mean)
Time per request: 4667.434 [ms] (mean)
Time per request: 466.743 [ms] (mean, across all concurrent requests)
Transfer rate: 30.92 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.8 0 7
Processing: 1703 4588 2518.1 4090 10632
Waiting: 1627 4323 2396.7 3716 9809
Total: 1703 4588 2518.3 4090 10632

Percentage of the requests served within a certain time (ms)
50% 4090
66% 5160
75% 6654
80% 6945
90% 8670
95% 9532
98% 10449
99% 10632
100% 10632 (longest request)

微妙。

このエントリを読んだ人はこんなんも読んでいます

トラックバック(1)

トラックバックURL: http://blog.kenji00.com/MT/mt-tb.cgi/134

ベンチマークに使っていたXOOPSアプリのcache機能を使っていなかったので、... 続きを読む

コメントする

過去のエントリ(一覧)

Powered by Movable Type 4.261
Creative Commons License
このブログはクリエイティブ・コモンズでライセンスされています。