From: forehead<for...@4r...> - 2003-11-03 14:57:03
|
hi, openinteract-dev in apache cgi envriment, the first page [URL:/] gets: the code took: 5 wallclock secs ( 1.73 usr 0.23 sys + 0.00 cusr 0.11 csys = 2.06 CPU) the code took: 4 wallclock secs ( 1.76 usr 0.22 sys + 0.00 cusr 0.11 csys = 2.09 CPU) and same code under mod_perl gets: the code took: 1 wallclock secs ( 0.46 usr + 0.07 sys = 0.53 CPU) # fisrt request the code took: 0 wallclock secs ( 0.16 usr + 0.01 sys = 0.17 CPU) # later request apache 1.3.26 with mod_perl 1.26 OS: (use dmesg): ================================= FreeBSD 4.8-RELEASE #0: Thu Apr 3 10:53:38 GMT 2003 ro...@fr...:/usr/obj/usr/src/sys/GENERIC Timecounter "i8254" frequency 1193182 Hz CPU: Intel(R) Celeron(TM) CPU 1000MHz (1001.77-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x6b1 Stepping = 1 Features=0x383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE> real memory = 125763584 (122816K bytes) avail memory = 117137408 (114392K bytes) in cgi mode, it seems need more time to init, process, I still not clear which phrase is the time-cost-est still no idea about cache's effect. some optimize policy? # cgi-bin/oi2.cgi #================ use Benchmark; { # benchmark start tag my $t0 = new Benchmark; .... $response->send; # benchmark end tag my $t1 = new Benchmark; my $td = timediff($t1, $t0); print "the code took:",timestr($td),"\n"; } # Apache::OpenInteract2.pm #========================= use Benchmark; sub handler($$) { my ( $class, $r ) = @_; # benchmark start tag my $t0 = new Benchmark; .... $response->send; # benchmark end tag my $t1 = new Benchmark; my $td = timediff($t1, $t0); print "the code took:".timestr($td)."\n"; return $response->status; } ---------------------- forehead (Chun Sheng) for...@4r... 2003-11-03 |