Hi! We use Embperl to generate dynamical pages for our router & switches bandwidth statistics. We poll them using snmp and store the data in an oracle database we access usind dbi and dbd::oracle. The "old" machine: 800Mhz PIII with 256MB ram RedHat 6.2 Apache 1.3.19 with mod_perl 1.25 and embperl 1.3.1 The "new" machine: 866Mhz PIII with 256MB ram RedHat 7.2 Apache 1.3.22 with mod_perl 1.26 and embperl 2.0b7 The slowest embperl script generates a html file which shows a selectable table. I attached it here: (See attached file: view-table.epl) In this embperl logfile you see how long the script takes to run: (See attached file: embperl.log) I tried for one week to change apache settings and other things but the thing is damn slow! Almost 1 minute for the biggest table which has ~2100 lines with 16 fields per line. The httpd process on the "new" machine uses all available processor ressources available for the whole time! I hope you can help me!!! THX AlexTitle: SQL table lister [- use nactools; eval { local $SIG{'__DIE__'}; $maxcol = 100; $maxrow = 10000; $sort = $fdat{"sort"}; $table = $fdat{"table"}; $sqlcmd = "SELECT * FROM $table "; if($sort) { $sqlcmd .= "ORDER BY $sort "; } $dbh = connectdb(); # get column names $sth = $dbh->prepare($sqlcmd); @colnames = @{$sth->{NAME_uc}}; foreach $index ( 0 .. $#colnames) { $colnames[$index] =~ s/ *$//; if (uc($colnames[$index]) eq uc($fdat{"pkey"})) { $pkeycol = $index; } } # get table @lines = @{$dbh->selectall_arrayref($sth)}; }; perish($@) if $@; -]
Table [+ $table +] returned [+ $#lines+1 +] rows
| [+ $colname +] | [$ endforeach $] [$ if ($fdat{"pkey"} ne "") $][$ endif $] |
|---|---|
| [+ $column +] | [$ endforeach $][- $record->[$pkeycol] =~ s/ *$//; -] [$pkeycol] +]&retcmd=[+ $ENV{"REQUEST_URI"} +]">Edit |
embperl.log
Description: Binary data
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
