Post by ZoTyAengem a temaval kapcsolatban az erdekelne, hogy fcgid -vel milyen
sebesseget lehet elerni?
suphp (ami vegulis suexec+php-cgi apache modul formajaban) megoldassal
tokeletesen mukodott a php futtatas, semmilyen mukodesbeli korlatba nem
utkoztem (header, httpauth, stb), viszont a sebesseg latvanyosan
leesett. egy egyszeru phpinfo mod_php -hoz kepest 4-5x lassabb volt, a
bonyolultabb php-k viszont akar 8-10x is lassabbak lettek. ennyit
viszont nem tudok bealdozni, hogy secure legyen...
Valami nem stimmel szerintem. A "bonyolultabb" php-k eseteben eppenhogy
kisebb kene legyen a kulonbseg, mivel a php interpreter ugyanaz mindket
esetben, a kulso processzes fcgi eseteben a kommunikacio miatt lehet egy
nagyobb alap /request overhead.
phpinfo():
FCGI:
Server Software: Apache/2.0.54
Document Path: /info.php
Document Length: 30315 bytes
Concurrency Level: 20
Time taken for tests: 14.685323 seconds
Complete requests: 10000
Total transferred: 265447073 bytes
HTML transferred: 263796139 bytes
Requests per second: 680.95 [#/sec] (mean)
Time per request: 29.371 [ms] (mean)
Time per request: 1.469 [ms] (mean, across all concurrent requests)
Transfer rate: 17651.98 [Kbytes/sec] received
MOD:
Server Software: Apache/2.0.54
Document Path: /info.php
Document Length: 31036 bytes
Concurrency Level: 20
Time taken for tests: 13.383710 seconds
Complete requests: 10000
Total transferred: 312154136 bytes
HTML transferred: 310732432 bytes
Requests per second: 747.18 [#/sec] (mean)
Time per request: 26.767 [ms] (mean)
Time per request: 1.338 [ms] (mean, across all concurrent requests)
Transfer rate: 22776.79 [Kbytes/sec] received
Szerintem a phpinfo teszt nem igazan jo a kulonbseg megallapitasara,
mert sok php interpreter munka van benne. Nezzunk egy <?echo "a";?> -t.
FCGI:
Server Software: Apache/2.0.54
Document Path: /a.php
Document Length: 2 bytes
Concurrency Level: 20
Time taken for tests: 4.888327 seconds
Complete requests: 10000
Total transferred: 1440720 bytes
HTML transferred: 20010 bytes
Requests per second: 2045.69 [#/sec] (mean)
Time per request: 9.777 [ms] (mean)
Time per request: 0.489 [ms] (mean, across all concurrent requests)
Transfer rate: 287.62 [Kbytes/sec] received
MOD:
Server Software: Apache/2.0.54
Document Path: /a.php
Document Length: 2 bytes
Concurrency Level: 20
Time taken for tests: 3.602122 seconds
Complete requests: 10000
Total transferred: 1630815 bytes
HTML transferred: 20010 bytes
Requests per second: 2776.14 [#/sec] (mean)
Time per request: 7.204 [ms] (mean)
Time per request: 0.360 [ms] (mean, across all concurrent requests)
Transfer rate: 441.96 [Kbytes/sec] received
Tehat +2.5ms/req. Egyebkent ezt vessuk ossze a phpinfo() eredmennyel, es
ott is +2.5ms/req.
Tehat ez az, amit az elejen mondtam, hogy konstans overhead van, tok
fuggetlen az adott php bonyolultsagatol.
(Ha te olyan kornyezetrol beszelsz, ahol van valami php-cache (pl
turck), az mas kerdes.)
--
.SiCk of IT.