Crypt-DSA - mod_perl slownes

Posted on Fri Jun 22 15:39:53 2007 by luckymart
mod_perl slownes
When i run trhis script from the console, it takes less than one second but under mod_perl environment the time grows to 20 sec! Please help me to find solution
use strict; use Crypt::DSA::Key; my $key_file = '/var/www/.ssh/id_dsa'; my $keytype = 'PEM'; my $passphrase = ''; my $dsa = Crypt::DSA::Key->new( Filename => $key_file, Type => $keytype, Password => $passphrase );
Strace chunk:
15:01:36.692256 fcntl64(13, F_SETFD, FD_CLOEXEC) = 0 <0.000016> 15:01:36.692337 fstat64(13, {st_mode=S_IFREG|0644, st_size=668, ...}) = 0 <0.000 016> 15:01:36.692510 read(13, "-----BEGIN DSA PRIVATE KEY-----\n"..., 4096) = 668 <0. 000048> 15:01:36.692642 read(13, "", 4096) = 0 <0.000018> 15:01:36.692724 close(13) = 0 <0.000020> 15:01:58.900604 gettimeofday({1182510118, 900655}, NULL) = 0 <0.000021> 15:01:58.900789 write(2, "elapsed : 32.304654 at /usr/lib/"..., 85) = 85 <0.000052>
Write a response