httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Suvendu Sekhar Mondal <suv3...@gmail.com>
Subject Re: [users@httpd] Slow Apache 2.4 server
Date Sat, 23 Jun 2018 05:28:42 GMT
On Fri, Jun 22, 2018, 9:24 PM Richard <lists-apache@listmail.innovate.net>
wrote:

>
>
> > Date: Thursday, June 21, 2018 20:06:16 +0200
> > From: Jørn <apache2.user@dahl-stamnes.net>
> >
> > On Thursday, June 21, 2018 08:11:02 Gryzli Bugbear wrote:
> >> Hi,
> >>
> >> Maybe you should first find where the slowness come from (most
> >> probably it is php, rather than Apache).
> >
> > That was in my mind, but tests show that PHP is much faster on the
> > new server than on the  old one. PHP 7 is by nature faster than PHP
> > 5.x and the since the new server is much more  powerfull (8 cores
> > vs 2 and higher cpu and memory frequency).
> >
> > There is not much to do for the PHP code to render the thumbnails.
> > It just get the image  identifier from the URL, looks up in the
> > database and based on the answer from the  database, it read a
> > small file from the disk and return it to the client.
> >
> > But to be sure, I added timers to check the speed of the code. It
> > confirm that the PHP  code itself IS much faster on the new server.
> >
> > The old server is a dual core AMD @ 800 Mhz CPU speed.
> > The new server is a 8 core AMD @ 4 Ghz CPU speed.
> >
>
> What are the rated data transfer rates of the disks on the two
> machines? While the new machine's disks *should* be at least as fast,
> there are a range of variables and so no guarantee. As a basic test,
> try simple file transfers (e.g., using scp) between these two
> machines and a third one. Do both large files, and groups of small
> ones. You need to keep as many variables as possible constant in the
> test - e.g., same network connectivity from these servers to testing
> machine, etc.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org


Can you please print out request processing time in your access log for
both of your environments. You need to add %D in the logformat expression.
More details on http://httpd.apache.org/docs/current/mod/mod_log_config.html

I agree with Richard. Disk latency is crucial here since your code is
reading from the disk. Read, write and transfer counters are the important
ones along with disc queue. You can search them for your  OS over Internet.
Please compare that for your two environments. Let us know what you found.

Thanks!

Mime
View raw message