Better PC, worse performance
Posted by: mikelefree (---.business.telecomitalia.it)
Date: October 13, 2021 06:34PM

Hello there,

I built a fast and powerful PC that I use as WAMP local server in a company with about 30 simultaneous users, it is really under-exploited.

Some specs:

MB: Gigabyte Z590 UD
CPU: i5 11600K
RAM: 2x8GB DDR4 3200Mhz
SSD: M.2 Crucial P5
HDD: 2 x Seagate IRONWOLF RAID 1

This new PC replaced the old one, not only in hardware but also with latest software version of PHP ( from 5.3.8 to 8.0.11 ) and MySQL ( from 5.0.8 to 8.0.26 ). Using WAMP 3.2.5 instead of EasyPHP 5, so a lot of changes, a big step forward.
Aware all these changement are not directly proportional to the speed of the server, I would like to set up the best settings to exploit at max as possible the power of this little beast cause I think that standard settings are a bottleneck while I have a lot of resources to use. Unexpectedly at the moment performance are worse than before, significantly.

So the question is, which and how I can change parameters to improve performance of server?

Thanks,

Michele



Edited 2 time(s). Last edit at 10/13/2021 10:04PM by mikelefree.

Options: ReplyQuote
Re: Better PC, worse performance
Posted by: RiggsFolly (Moderator)
Date: October 14, 2021 02:15PM

First you need to identify the bottleneck that need to be fixed.

I would suggest that moving from PHP5.3 to PHP8 should be a major speed improvement in code runtime.

However, optimisation depends on some many things, so much more than just the box you run it on. As I say you need to identify where the probelms are, there is no point in optimising Apache if MySQL is the issue!

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Better PC, worse performance
Posted by: mikelefree (---.business.telecomitalia.it)
Date: October 14, 2021 03:42PM

Thank you for your reply.

Just to give some data about the issue,

Login Page - Pure PHP, no MySQL queries
Old server 0,000/0,001 sec
New server 0,016 sec - Once in a 30 attempts I got 0.001 sec

Another page with PHP, Java, MySQL queries
Old server 0.068 sec
New server 1.900 sec - Once in a lot of attempts I got 0.375 as best result


Do you have some suggestions how to search and find bottlenecks?

Options: ReplyQuote
Re: Better PC, worse performance
Posted by: RiggsFolly (Moderator)
Date: October 14, 2021 03:56PM

Hmm this is not really the purpose of this site, but I will help with suggestions if I can.


1. PHP8 has major speed improvements over PHP5.6 and even more over PHP5.3, so the slowness of a purely PHP script is very odd. To me it points to other things being involved here, maybe even the network you are running on. Caching maybe?

2. I would look into the phpMyAdmin tools, in there you will find some anylytics that can suggest config improvements based on the actual usage the database is experiencing. Needs to run for a while to get the best results.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Better PC, worse performance
Posted by: Otomatic (Moderator)
Date: October 14, 2021 04:03PM

Hi,

In old versions of PHP (5.3.x) there was xdebug 2.x with parameters :
xdebug.remote_enable = off
xdebug.profiler_enable = off

Maybe even under EasyPHP, xdebug was not loaded.

In recent versions of PHP 7.2 to 8.0 there is xDebug 3.0.4 with parameter :
xdebug.mode = develop

Try with xdebug.mode = off

Left-Click -> PHP -> PHP settings -> xdebug.mode -> off

They are neither the same PHP extensions loaded nor the same configurations of said extensions as of PHP 5.3. The same is true for Apache modules.

On the other hand, Wampserver 3 is a development server and is configured to help as much as possible with development and debugging. It is not designed to be a production server and I would be hard pressed to tell you how to optimize access times.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Better PC, worse performance
Posted by: mikelefree (---.business.telecomitalia.it)
Date: October 14, 2021 06:10PM

RiggsFolly Wrote:
-------------------------------------------------------
> Hmm this is not really the purpose of this site,
> but I will help with suggestions if I can.
>
>
> 1. PHP8 has major speed improvements over PHP5.6
> and even more over PHP5.3, so the slowness of a
> purely PHP script is very odd. To me it points to
> other things being involved here, maybe even the
> network you are running on. Caching maybe?
>
> 2. I would look into the phpMyAdmin tools, in
> there you will find some anylytics that can
> suggest config improvements based on the actual
> usage the database is experiencing. Needs to run
> for a while to get the best results.

Yes, I know that, so I really appreciated your answer. Hope at the end this topic can be helpful to someone else.

1. Could caching be a problem also in local? Cause I got same results, as from client as from server.

2. I going to check it out and update topic soon, probably tomorrow.


Otomatic Wrote:
-------------------------------------------------------
> Hi,
>
> In old versions of PHP (5.3.x) there was xdebug
> 2.x with parameters :
> xdebug.remote_enable = off
> xdebug.profiler_enable = off
>
> Maybe even under EasyPHP, xdebug was not loaded.
>
> In recent versions of PHP 7.2 to 8.0 there is
> xDebug 3.0.4 with parameter :
> xdebug.mode = develop
>
> Try with xdebug.mode = off
>
> Left-Click -> PHP -> PHP settings -> xdebug.mode
> -> off
>
> They are neither the same PHP extensions loaded
> nor the same configurations of said extensions as
> of PHP 5.3. The same is true for Apache modules.
>
> On the other hand, Wampserver 3 is a development
> server and is configured to help as much as
> possible with development and debugging. It is not
> designed to be a production server and I would be
> hard pressed to tell you how to optimize access
> times.


Hi,

thank you for the answer.

I had already disabled xdebug

Left-Click -> PHP -> PHP extensions -> php_xdebug 3.0.4

But after your message I also wrote "off" in php.ini where the value was "develop" as you said.
I have to say that I did not notice a big difference with and without xdebug.

-- Additional information

Something here is really strange, old server still operating with many clients connected on local network works with very quick timing as I wrote previously, the new server give me bad results in local and with no one connected and no remote resources to use. So I tend to rule out a network problem.

Options: ReplyQuote
Re: Better PC, worse performance
Posted by: mikelefree (151.84.82.---)
Date: November 05, 2021 07:38PM

I solved the problem thanks to xDebug. The problem was too many function calls to connect to MySQL DB.


Thanks to everyone spent a little time to read and answer!

Options: ReplyQuote


Sorry, only registered users may post in this forum.