[Technik] FastCGI (Benchmark)
Michael Hierweck
team at edv-serviceteam.net
Mon Nov 26 16:23:52 CET 2007
Hallo,
ich habe auf h51 (dedicated server) mit FastGI experimentiert. Dazu habe
ich das folgende Paket verwendet:
apt-cache show libfcgi0c2
Package: libfcgi0c2
Priority: optional
Section: libs
Installed-Size: 741
Maintainer: Tatsuki Sugiura <sugi at nemui.org>
Architecture: i386
Source: libfcgi
Version: 2.4.0-6
Replaces: libfcgi0
Provides: libfcgi
Depends: libc6 (>= 2.3.6-6), libgcc1 (>= 1:4.1.1-12)
Conflicts: libfcgi0
Filename: pool/main/libf/libfcgi/libfcgi0c2_2.4.0-6_i386.deb
Size: 278410
MD5sum: 75a526cb4037de586f9c8417164175ad
SHA1: 2ead63e55073b6a7fb9fe85b0790d1dc5271e398
SHA256: 9d0b283bdbca62a05667740343dd4015e4293cada251a38edc51988e946eafa6
Description: Shared library of FastCGI
FastCGI is a language independent, scalable, open extension
to CGI that provides high performance without the limitations
of server specific APIs.
Tag: role::shared-lib
Folgende Benchmarks beim Abruf einer typischen LAMP-Anwendung erzeugt.
PHP/CGI mit phpstub:
Server Software: Apache/1.3.34
Server Hostname: www.example.com
Server Port: 80
Document Path: /test.php
Document Length: 758 bytes
Concurrency Level: 2
Time taken for tests: 28.949478 seconds
Complete requests: 1000
Failed requests: 175
(Connect: 0, Length: 175, Exceptions: 0)
Write errors: 0
Total transferred: 1214475 bytes
HTML transferred: 813475 bytes
Requests per second: 34.54 [#/sec] (mean)
Time per request: 57.899 [ms] (mean)
Time per request: 28.949 [ms] (mean, across all concurrent requests)
Transfer rate: 40.97 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.3 0 7
Processing: 48 57 9.1 54 123
Waiting: 46 54 9.4 51 123
Total: 48 57 9.1 54 123
Percentage of the requests served within a certain time (ms)
50% 54
66% 57
75% 60
80% 62
90% 70
95% 77
98% 84
99% 90
100% 123 (longest request)
PHP/FastCGI mit Wrapper Bash-Skript:
Server Software: Apache/1.3.34
Server Hostname: www.example.com
Server Port: 80
Document Path: /test.php
Document Length: 758 bytes
Concurrency Level: 2
Time taken for tests: 12.164652 seconds
Complete requests: 1000
Failed requests: 180
(Connect: 0, Length: 180, Exceptions: 0)
Write errors: 0
Non-2xx responses: 2
Total transferred: 1080068 bytes
HTML transferred: 814146 bytes
Requests per second: 82.21 [#/sec] (mean)
Time per request: 24.329 [ms] (mean)
Time per request: 12.165 [ms] (mean, across all concurrent requests)
Transfer rate: 86.64 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0
Processing: 13 23 4.5 22 71
Waiting: 13 23 4.3 21 70
Total: 13 23 4.5 22 71
Percentage of the requests served within a certain time (ms)
50% 22
66% 23
75% 24
80% 24
90% 30
95% 32
98% 36
99% 42
100% 71 (longest request)
Probeweise habe ich das Bash-Skript durch einen gepatchten phpstub (in
C) ersetzt. Der Performancegewinn war marginal: in der Summe ca. 0.5
Sekunden für 1000 Requests.
Soweit nur zur Information.
Ich würde gern wissen, wie sich FastCGI in Bezug auf die Gesamtleistung
unserer Shared Hives auswirken würde.
Viele Grüße
Michael
--
EDV-Serviceteam Werthmann & Hierweck GbR
Annika Werthmann, Michael Hierweck
Egerstraße 53, 44225 Dortmund
http://www.edv-serviceteam.net
More information about the Technik
mailing list