compilation/performance problem on solaris

From: Date: Fri, 24 Oct 2003 20:15:29 +0000
Subject: compilation/performance problem on solaris
Groups: php.install 
Request: Send a blank email to php-install+get-12120@lists.php.net to get a copy of this message
Hi, 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

« previous php.install (#12120) next »