logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Memory vs CPU
Author
Materix



Joined: 30 Aug 2012
Posts: 42

PostPosted: Tue 23 Mar '21 21:53    Post subject: Memory vs CPU Reply with quote

I have an Apache 2.4 with PHP on a Windows 2016-server, and there is a lot of traffic.

Therefore the CPU runs close to 100%, while only 4GB of 12GB is being used.

How can I move more of the load from the CPU over to the memory?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Tue 23 Mar '21 23:46    Post subject: Reply with quote

Well the CPU is doing the work. More RAM can't compensate that.

Do you use PHP as module or over fcgid?
Back to top
Materix



Joined: 30 Aug 2012
Posts: 42

PostPosted: Tue 23 Mar '21 23:47    Post subject: Reply with quote

Thanks for the reply.

It runs as fcgid.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Tue 23 Mar '21 23:52    Post subject: Reply with quote

Then you can only have a second server and a load balancer OR more CPU cores.


Code:

Apache Load Balancer <--------> Apache 1 with fcgid PHP
                     ^
                     |
                     ---------> Apache 2 with fcgid PHP
Back to top
Materix



Joined: 30 Aug 2012
Posts: 42

PostPosted: Wed 24 Mar '21 0:22    Post subject: Reply with quote

Thanks!

I will look into that.
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1266
Location: Amsterdam, NL, EU

PostPosted: Thu 25 Mar '21 15:35    Post subject: Reply with quote

Curious: which PHP version are you using? Is the OPCache module loaded?
Back to top
Materix



Joined: 30 Aug 2012
Posts: 42

PostPosted: Thu 25 Mar '21 15:54    Post subject: Reply with quote

It is PHP 5.6.40 and no OPCache. Does OPCache help?
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1266
Location: Amsterdam, NL, EU

PostPosted: Thu 25 Mar '21 16:16    Post subject: Reply with quote

OPcache is tricky. I had it working for a Drupal 7 site for a long time with PHP 5.6 as mod_fcgid. In theory it should work.

Are you running the 64-bits or the 32-bits version of PHP 5.6.40?

Ever thought of upgrading to PHP 7 (7.4)? That version is quite mature now and faster than PHP 5.6.
Back to top
Materix



Joined: 30 Aug 2012
Posts: 42

PostPosted: Thu 25 Mar '21 20:10    Post subject: Reply with quote

Thanks for the reply!

64-bit version of PHP.

It is a legacy application, so PHP 7/8 is not currently an option.
Back to top


Reply to topic   Topic: Memory vs CPU View previous topic :: View next topic
Post new topic   Forum Index -> Apache