Thread mod_perl2 total bekloppter benchmark (8 answers)
Opened by Froschpopo at 2006-03-02 06:24

Froschpopo
 2006-03-02 06:24
#29960 #29960
User since
2003-08-15
2653 Artikel
BenutzerIn
[default_avatar]
Von wegen schlechte Datenstrukturen.
Hier mein getestetes Script:
Code: (dl )
1
2
3
#!/usr/bin/perl
print "Content-Type: text/html\n\n";
print "hallo";


Hier sind die Benchmarks mit folgender Einbindung in der httpd.conf:
Code: (dl )
1
2
3
4
5
<FilesMatch "hallo\.pl$">
    SetHandler perl-script
    PerlHandler ModPerl::Registry
    Options +ExecCGI
</FilesMatch>

ERGIBT:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Server Software:        Apache/2.0.53
Server Hostname:        localhost
Server Port:            80

Document Path:          /cgi-bin/hallo.pl
Document Length:        29 bytes

Concurrency Level:      5
Time taken for tests:   0.643215 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      17400 bytes
HTML transferred:       2900 bytes
Requests per second:    155.47 [#/sec] (mean)
Time per request:       32.161 [ms] (mean)
Time per request:       6.432 [ms] (mean, across all concurrent requests)
Transfer rate:          24.88 [Kbytes/sec] received

Connection Times (ms)
             min  mean[+/-sd] median   max
Connect:        8   16   3.7     18      23
Processing:     7   14   8.7     12      91
Waiting:        7   13   8.7     12      90
Total:         18   30   9.2     30     112

Percentage of the requests served within a certain time (ms)
 50%     30
 66%     31
 75%     32
 80%     33
 90%     34
 95%     38
 98%     48
 99%    112
100%    112 (longest request)


Jetzt OHNE Einbindung von modperl:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Server Software:        Apache/2.0.53
Server Hostname:        localhost
Server Port:            80

Document Path:          /cgi-bin/hallo.pl
Document Length:        29 bytes

Concurrency Level:      5
Time taken for tests:   0.562186 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      17400 bytes
HTML transferred:       2900 bytes
Requests per second:    177.88 [#/sec] (mean)
Time per request:       28.109 [ms] (mean)
Time per request:       5.622 [ms] (mean, across all concurrent requests)
Transfer rate:          28.46 [Kbytes/sec] received

Connection Times (ms)
             min  mean[+/-sd] median   max
Connect:       10   14   1.9     15      19
Processing:     7   12   2.7     12      21
Waiting:        6   11   2.7     12      21
Total:         18   27   2.5     27      37

Percentage of the requests served within a certain time (ms)
 50%     27
 66%     28
 75%     28
 80%     29
 90%     31
 95%     31
 98%     34
 99%     37
100%     37 (longest request)


Meine Frage: warum ist das einfachste script der Welt MIT modperl fast doppelt so langsam wie ohne modperl?
Welchen Sinn erfüllt denn dann modperl überhaupt?

Ich habe folgendes Bench genutzt:
ab2 -n 100 -c 5 http://localhost/cgi-bin/script.pl\n\n

<!--EDIT|Froschpopo|1141274638-->

View full thread mod_perl2 total bekloppter benchmark