Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
We have a server management portal. The portal was coded many years back for php 4. When PHP 4 reached EOL, we checked whether it could be run in PHP 5 and we found that it could run in PHP 5. So it has been running fine in PHP 5 for past couple of months
In last week, we migrated this portal to a new server with SSD(solid state) hard disk.
Since the migration, PHP in this server management portal is taking too much time to complete execution.
I verified following.
1. it is not server load or short of any resources
2. it is not mysql which is creating bottleneck.
3. it is not apache version or php version or php modules or mysql version.
4. all other websites in the same server is working fine.
5. server management portal is working in our test environments with same softwares.
Now, I am going to upgrade kernel to see whether it is affecting.
I am not getting any clue about what could be any done further.
Could anyone provide any inputs or clues about what could be done to find out what is happening.
>> Did you checked verified process blocking using vmstat command?
I shall check this.
Apart from that,
This is a cpanel server. I tried running PHP as both DSO and suPHP. It is currently running as suPHP. Changing to DSO didn't improve performance.
I managed to catch a PHP process in strace.
This is what I see. I will see that process is stuck with "read(5," for some time. After that, the process will run & I could see page loading in browser.
...additionally attach your strace right after you restarted the web server and not haphazardly during thread execution, use "-f -ff -v" as well and up the size of the printable string size with "-s". Also see Xdebug (KCacheGrind, FirePHP, XHProf, PHPeclipse, etc) wrt debugging / profiling?
>>additionally attach your strace right after you restarted the web server and not haphazardly during thread execution, use "-f -ff -v" as well and up the size of the printable string size with "-s".
@unSpawn
If I am wrong, please excuse me.
Currently, apache is spawning a new PHP process to execute PHP script. So, I could catch a PHP process during run time only.
FYI,
server is using suPHP.
I tried using "-f -ff -v", but the the PHP process still waits at "read"
>> Also see Xdebug (KCacheGrind, FirePHP, XHProf, PHPeclipse, etc) wrt debugging / profiling?
I tried this earlier, but it didn't help with any useful info.
The issue I now experience is at the "read" thing. After that PHP starts executing all of a sudden.
If MPM is the case then I think server-status using mod_status worth to see. What I can understand that page php page processing taking time putting prefork in waiting state.
This is what I see until page is displayed browser.
Does this mean that HTTPD is taking time to read requests & send reply ?
root@myserver [~]# httpd status
Apache Server Status for localhost
Server Version: Apache/2.2.22 (Unix) mod_ssl/2.2.22
OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4
FrontPage/5.0.2.2635 mod_jk/1.2.35
Server Built: Jun 28 2012 00:56:23
_________________________________________________________________
Current Time: Saturday, 06-Apr-2013 14:11:52 EST
Restart Time: Monday, 18-Mar-2013 06:30:23 EST
Parent Server Generation: 242
Server uptime: 19 days 7 hours 41 minutes 29 seconds
Total accesses: 1516116 - Total Traffic: 20.6 GB
CPU Usage: u3.44 s.81 cu71.08 cs0 - .00451% CPU load
.908 requests/sec - 13.0 kB/second - 14.3 kB/request
4 requests currently being processed, 7 idle workers
Scoreboard Key:
"_" Waiting for Connection, "S" Starting up, "R" Reading Request,
"W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
"C" Closing connection, "L" Logging, "G" Gracefully finishing,
"I" Idle cleanup of worker, "." Open slot with no current process
root@myserver [~]# httpd status
Apache Server Status for localhost
Server Version: Apache/2.2.22 (Unix) mod_ssl/2.2.22
OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4
FrontPage/5.0.2.2635 mod_jk/1.2.35
Server Built: Jun 28 2012 00:56:23
_________________________________________________________________
Current Time: Saturday, 06-Apr-2013 14:11:55 EST
Restart Time: Monday, 18-Mar-2013 06:30:23 EST
Parent Server Generation: 242
Server uptime: 19 days 7 hours 41 minutes 32 seconds
Total accesses: 1516118 - Total Traffic: 20.6 GB
CPU Usage: u3.44 s.81 cu71.22 cs0 - .00452% CPU load
.908 requests/sec - 13.0 kB/second - 14.3 kB/request
4 requests currently being processed, 7 idle workers
Scoreboard Key:
"_" Waiting for Connection, "S" Starting up, "R" Reading Request,
"W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
"C" Closing connection, "L" Logging, "G" Gracefully finishing,
"I" Idle cleanup of worker, "." Open slot with no current process
root@myserver [~]# httpd status
Apache Server Status for localhost
Server Version: Apache/2.2.22 (Unix) mod_ssl/2.2.22
OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4
FrontPage/5.0.2.2635 mod_jk/1.2.35
Server Built: Jun 28 2012 00:56:23
_________________________________________________________________
Current Time: Saturday, 06-Apr-2013 14:11:57 EST
Restart Time: Monday, 18-Mar-2013 06:30:23 EST
Parent Server Generation: 242
Server uptime: 19 days 7 hours 41 minutes 34 seconds
Total accesses: 1516119 - Total Traffic: 20.6 GB
CPU Usage: u3.44 s.81 cu71.38 cs0 - .00453% CPU load
.908 requests/sec - 13.0 kB/second - 14.3 kB/request
4 requests currently being processed, 7 idle workers
Scoreboard Key:
"_" Waiting for Connection, "S" Starting up, "R" Reading Request,
"W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
"C" Closing connection, "L" Logging, "G" Gracefully finishing,
"I" Idle cleanup of worker, "." Open slot with no current process
root@myserver [~]# httpd status
Apache Server Status for localhost
Server Version: Apache/2.2.22 (Unix) mod_ssl/2.2.22
OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4
FrontPage/5.0.2.2635 mod_jk/1.2.35
Server Built: Jun 28 2012 00:56:23
_________________________________________________________________
Current Time: Saturday, 06-Apr-2013 14:11:58 EST
Restart Time: Monday, 18-Mar-2013 06:30:23 EST
Parent Server Generation: 242
Server uptime: 19 days 7 hours 41 minutes 35 seconds
Total accesses: 1516120 - Total Traffic: 20.6 GB
CPU Usage: u3.44 s.81 cu71.38 cs0 - .00453% CPU load
.908 requests/sec - 13.0 kB/second - 14.3 kB/request
4 requests currently being processed, 7 idle workers
Scoreboard Key:
"_" Waiting for Connection, "S" Starting up, "R" Reading Request,
"W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
"C" Closing connection, "L" Logging, "G" Gracefully finishing,
"I" Idle cleanup of worker, "." Open slot with no current process
root@myserver [~]# httpd status
Apache Server Status for localhost
Server Version: Apache/2.2.22 (Unix) mod_ssl/2.2.22
OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4
FrontPage/5.0.2.2635 mod_jk/1.2.35
Server Built: Jun 28 2012 00:56:23
_________________________________________________________________
Current Time: Saturday, 06-Apr-2013 14:12:00 EST
Restart Time: Monday, 18-Mar-2013 06:30:23 EST
Parent Server Generation: 242
Server uptime: 19 days 7 hours 41 minutes 36 seconds
Total accesses: 1516122 - Total Traffic: 20.6 GB
CPU Usage: u3.44 s.81 cu71.44 cs0 - .00453% CPU load
.908 requests/sec - 13.0 kB/second - 14.3 kB/request
4 requests currently being processed, 7 idle workers
Scoreboard Key:
"_" Waiting for Connection, "S" Starting up, "R" Reading Request,
"W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
"C" Closing connection, "L" Logging, "G" Gracefully finishing,
"I" Idle cleanup of worker, "." Open slot with no current process
root@myserver [~]# httpd status
Apache Server Status for localhost
Server Version: Apache/2.2.22 (Unix) mod_ssl/2.2.22
OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4
FrontPage/5.0.2.2635 mod_jk/1.2.35
Server Built: Jun 28 2012 00:56:23
_________________________________________________________________
Current Time: Saturday, 06-Apr-2013 14:12:03 EST
Restart Time: Monday, 18-Mar-2013 06:30:23 EST
Parent Server Generation: 242
Server uptime: 19 days 7 hours 41 minutes 40 seconds
Total accesses: 1516123 - Total Traffic: 20.6 GB
CPU Usage: u3.44 s.81 cu71.44 cs0 - .00453% CPU load
.908 requests/sec - 13.0 kB/second - 14.3 kB/request
4 requests currently being processed, 7 idle workers
Scoreboard Key:
"_" Waiting for Connection, "S" Starting up, "R" Reading Request,
"W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
"C" Closing connection, "L" Logging, "G" Gracefully finishing,
"I" Idle cleanup of worker, "." Open slot with no current process
root@myserver [~]# httpd status
Apache Server Status for localhost
Server Version: Apache/2.2.22 (Unix) mod_ssl/2.2.22
OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4
FrontPage/5.0.2.2635 mod_jk/1.2.35
Server Built: Jun 28 2012 00:56:23
_________________________________________________________________
Current Time: Saturday, 06-Apr-2013 14:12:05 EST
Restart Time: Monday, 18-Mar-2013 06:30:23 EST
Parent Server Generation: 242
Server uptime: 19 days 7 hours 41 minutes 41 seconds
Total accesses: 1516124 - Total Traffic: 20.6 GB
CPU Usage: u3.44 s.81 cu71.86 cs0 - .00456% CPU load
.908 requests/sec - 13.0 kB/second - 14.3 kB/request
4 requests currently being processed, 7 idle workers
I tried again and I see following while page is loading.
Do you see anything abnormal ?
=================================
root@myserver [~]# httpd status
Apache Server Status for localhost
Server Version: Apache/2.2.22 (Unix) mod_ssl/2.2.22
OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4
FrontPage/5.0.2.2635 mod_jk/1.2.35
Server Built: Jun 28 2012 00:56:23
_________________________________________________________________
Current Time: Saturday, 06-Apr-2013 14:28:00 EST
Restart Time: Monday, 18-Mar-2013 06:30:23 EST
Parent Server Generation: 243
Server uptime: 19 days 7 hours 57 minutes 36 seconds
Total accesses: 1516604 - Total Traffic: 20.6 GB
CPU Usage: u3.32 s.79 cu88.79 cs0 - .00556% CPU load
.908 requests/sec - 13.0 kB/second - 14.3 kB/request
1 requests currently being processed, 9 idle workers
Scoreboard Key:
"_" Waiting for Connection, "S" Starting up, "R" Reading Request,
"W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
"C" Closing connection, "L" Logging, "G" Gracefully finishing,
"I" Idle cleanup of worker, "." Open slot with no current process
root@myserver [~]#
root@myserver [~]# httpd status
Apache Server Status for localhost
Server Version: Apache/2.2.22 (Unix) mod_ssl/2.2.22
OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4
FrontPage/5.0.2.2635 mod_jk/1.2.35
Server Built: Jun 28 2012 00:56:23
_________________________________________________________________
Current Time: Saturday, 06-Apr-2013 14:28:04 EST
Restart Time: Monday, 18-Mar-2013 06:30:23 EST
Parent Server Generation: 243
Server uptime: 19 days 7 hours 57 minutes 41 seconds
Total accesses: 1516605 - Total Traffic: 20.6 GB
CPU Usage: u3.32 s.79 cu88.91 cs0 - .00557% CPU load
.908 requests/sec - 13.0 kB/second - 14.3 kB/request
1 requests currently being processed, 9 idle workers
Scoreboard Key:
"_" Waiting for Connection, "S" Starting up, "R" Reading Request,
"W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
"C" Closing connection, "L" Logging, "G" Gracefully finishing,
"I" Idle cleanup of worker, "." Open slot with no current process
root@myserver [~]#
root@myserver [~]# httpd status
Apache Server Status for localhost
Server Version: Apache/2.2.22 (Unix) mod_ssl/2.2.22
OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4
FrontPage/5.0.2.2635 mod_jk/1.2.35
Server Built: Jun 28 2012 00:56:23
_________________________________________________________________
Current Time: Saturday, 06-Apr-2013 14:28:09 EST
Restart Time: Monday, 18-Mar-2013 06:30:23 EST
Parent Server Generation: 243
Server uptime: 19 days 7 hours 57 minutes 45 seconds
Total accesses: 1516606 - Total Traffic: 20.6 GB
CPU Usage: u3.32 s.79 cu88.91 cs0 - .00557% CPU load
.908 requests/sec - 13.0 kB/second - 14.3 kB/request
1 requests currently being processed, 9 idle workers
Scoreboard Key:
"_" Waiting for Connection, "S" Starting up, "R" Reading Request,
"W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
"C" Closing connection, "L" Logging, "G" Gracefully finishing,
"I" Idle cleanup of worker, "." Open slot with no current process
root@myserver [~]#
root@myserver [~]# httpd status
Apache Server Status for localhost
Server Version: Apache/2.2.22 (Unix) mod_ssl/2.2.22
OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4
FrontPage/5.0.2.2635 mod_jk/1.2.35
Server Built: Jun 28 2012 00:56:23
_________________________________________________________________
Current Time: Saturday, 06-Apr-2013 14:28:13 EST
Restart Time: Monday, 18-Mar-2013 06:30:23 EST
Parent Server Generation: 243
Server uptime: 19 days 7 hours 57 minutes 49 seconds
Total accesses: 1516608 - Total Traffic: 20.6 GB
CPU Usage: u3.32 s.79 cu89.47 cs0 - .0056% CPU load
.908 requests/sec - 13.0 kB/second - 14.3 kB/request
1 requests currently being processed, 9 idle workers
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.