does anybody know why my php on solaris is so terrible slow?
I'm using apache 1.3.28 and php 4.3.3 on solaris 9 with openssl96g and postgresql-7.3.2.
My hardware: sun-ultrasparc 1,2ghz dual with 8gb ram
For apache i used this commands to compile:
----------------------------------
export CFLAGS=' -O2 -mcpu=v9 -mtune=ultrasparc -funroll-loops -fexpensive-optimizations -des -Duse64bitall'
export CPPFLAGS=$CFLAGS
export LDDLFLAGS="-mcpu=v9 -m64 -G"
SSL_BASE=/usr/local/openssl ./configure --prefix=/usr/local/apache --enable-module=ssl --enable-module=rewrite --enable-module=so
make -j3
----------------------------------
and this for php:
----------------------------------
export CFLAGS=' -O2 -mcpu=v9 -mtune=ultrasparc -funroll-loops -fexpensive-optimizations -des -Duse64bitall'
export CPPFLAGS=$CFLAGS
export LDDLFLAGS="-mcpu=v9 -m64 -G"
./configure --prefix=/usr/local/php --enable-module=rewrite --enable-module=so --with-xml --with-pgsql=/usr/local/pgsql --with-zlib --with-gd --with-apxs=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/apache/conf
----------------------------------
If i run a simple php-script which builds an array of arrays i need ~3.3 sec to execute
-------------- testscript --------------
for($x=0;$x<200;$x++)
{
for($i=0;$i<2000;$i++)
{
$great_dump[] = array(1233,1233,455);
}
}
-------------- testscript --------------
to compare the speed: my notebook (p4 2.1 ghz/512mb ram/RedHat Linux 2.4 executes the code in 1.7 seconds
My first try with apache 2, but without any cpp-flags executes the code in 4.3 seconds.
Regards, Stefan