phpSysInfo 2.5.4 slow with nginx 0.6.32 and php-fpm

Hi, Im running a web server with nginx 0.6.32, php-fpm, on Ubuntu server
8.04. The system configuration is: Intel Pentium D 3.2, 4GB DDR2, 200GB
disk and a 20MBit connection. Every php script works quiet fast, but
phpSysinfo its really slow, seems to take like 3 sec to load, but when I
was running apache with mod_php it was working fast also.

Here is my configuration of nginx.conf and the info vhost:

user www-data;
worker_processes 2;

pid /var/run/nginx.pid;
error_log /var/log/nginx/error_log info;

events {
worker_connections 2048;
use epoll;
}

http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
fastcgi_buffer_size 4k;
client_body_buffer_size 64k;
server_tokens off;
server_names_hash_bucket_size 64;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 20;
gzip on;
gzip_proxied any;
gzip_comp_level 4;
gzip_types text/plain text/css text/xml application/xml
text/javascript text/html application/x-javascript;

include         /etc/nginx/sites-enabled/*;
include         /etc/nginx/sites-users/*;
include        /etc/nginx/sites-virtual/*;

}

server {
listen 80;
server_name info.example.org *.info.example.org;

access_log /var/log/nginx/info-access_log;
error_log /var/log/nginx/info-error_log;

location / {
root /srv/www/example.org/info;
index index.php index.html index.htm;
}

    location ~ .*\.php$ {
        fastcgi_pass   127.0.0.1:50000;
        fastcgi_index  index.php;

                fastcgi_param  SCRIPT_FILENAME

/srv/www/example.org/info$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
# PHP only, required if PHP was built with
–enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;

    }

#error_page 404 /404.html;

redirect server error pages to the static page /50x.html

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/nginx-default;
}

}

Also php-fpm is setup with 5 children, if it matters or not.

Robert G. wrote:

Also php-fpm is setup with 5 children, if it matters or not.
Hi,
phpSysInfo is a very slow script, full of reads to /proc and friends,
and polling deamons such as hddtemp. So it’s very slow even on good
configurations. Why don’t you try installing some opcode cachers such as
eAcclerator/XCache, if you haven’t done so yet?

Done that already, but I would have any issue that this script is slow,
but on a different configuration that I had, meaning Apache 2.0.x with
mod_php, it works much faster, then it works now on the same system.
Could be the OS? before I used CentOS 4.6 and now im on Ubuntu Server
8.04?!

Robert G. wrote:

Done that already, but I would have any issue that this script is slow,
but on a different configuration that I had, meaning Apache 2.0.x with
mod_php, it works much faster, then it works now on the same system.
Could be the OS? before I used CentOS 4.6 and now im on Ubuntu Server
8.04?!
Is the script slow when you run it from the console? Something like
this:
time php /path/to/phpSysInfo/index.php

Thats what I got.

real 0m3.078s
user 0m1.700s
sys 0m0.180s

Yeah maybe, but why, other script run quite fast… how could i find the
issue?

Robert G. wrote:

Thats what I got.

real 0m3.078s
user 0m1.700s
sys 0m0.180s
Slow again. Seems that your issue is PHP related, neither nginx nor fcgi
problem.

well you can compare what apache was built with and what your standalone
php
was build with by comparing the output of php_info() just write quick
script<?php
php_info(); ?>
and compare both outputs for modules. See what your apache mod_php
doesn’t
have included.

BTW I have the impression is because of some module that I build php
with. This could explain everything, as most of the script on my server
run faster that anything I ever seen before. Just the problem is: how to
find the module which slows the php down?!

Found the issue in phpsysinfo: $loadbar = true; if this is set, it is
taking a long time to process. I have set it to false and now phpsysinfo
loads in like 1.9 sec :slight_smile:

So seems it was all the time phpsysinfo :))))

Thanks guys for the help, anyway I wouldnt have looked for this.

Doesnt matter I rebuild php again from source with no modules and just
simple build and its the same thing. I have the impression is some
accessing issue, something related to the system, but I cant figure it
out, php as cli and php as cgi with or without modules and patches still
work the same slow.

So its not eider php, but I dont know how to find the issue.