High config, still website high cpu uses
#1
Hey guys, again Im facing high CPU uses issue. If you can fix this I will reward $25 as a friendly gift (its not a paid project). I can share skype / hangout / TeamViewer screen.


I'm using DMM Script. Using CentOs 5 32bit + NGINX + Php-Fpm + WordPress with 6GB Ram, 5core CPU.

TOP command result: http://imgur.com/a/Ih6WJ

Benchmark: 

Quote:System Info
-----------
Processor       : Intel® Xeon® CPU E31270 @ 3.40GHz
CPU Cores       : 5
Frequency       : 3399.986 MHz
Memory          : 6144 MB
Swap            : 0 MB
Uptime          : 4:43,

OS              : CentOS release 5.11 (Final)
Arch            : i686 (32 Bit)
Kernel          : 2.6.32-042stab113.21
Hostname        :


Speedtest (IPv4 only)
---------------------
Your public IPv4 is

Location                Provider        Speed
CDN                     Cachefly        87.4MB/s

Atlanta, GA, US         Coloat          73.1MB/s
Dallas, TX, US          Softlayer       106MB/s
Seattle, WA, US         Softlayer       38.1MB/s
San Jose, CA, US        Softlayer       48.4MB/s
Washington, DC, US      Softlayer       61.6MB/s

Tokyo, Japan            Linode          10.3MB/s
Singapore               Softlayer       8.56MB/s

Rotterdam, Netherlands  id3.net         13.6MB/s
Haarlem, Netherlands    Leaseweb        108MB/s


Disk Speed
----------
I/O (1st run)   : 638 MB/s
I/O (2nd run)   : 620 MB/s
I/O (3rd run)   : 611 MB/s
Average I/O     : 623 MB/s

I'm also using cache static contents by CloudFlare mode and checked Nginx logs if there is any bot crawling continuously. I've also followed all the LET tutorial links from Admin last time.
#2
I think rather than using php-fpm, you could use apache reverse proxy with nginx for handling PHP requests.
[Image: img.php?v2=1&userid=19445]
Thank you to freevps.us and http://nodeblade.com for FREE VPS  Angel
#3
CentOS 5.11 32 Bit with 6 GB RAM? You should use a newer CentOS version and 64 Bit with that much memory.

From your TOP results there is something blew up the php-fpm room and also your database server. You are running Wordpress and I bet it has a huge load of plugins and maybe also a lot of content?

Also there is one issue with the script you are using. It is optimized very well but not if you load up the server with all kind of addons/content and get a lot of traffic. You have to increase the resources the server components can use or otherwise everything will be overloaded because your server components are not getting the resources they need.

As you may be able to see PHP-FPM and MySQL cannot keep up with whatever is causing so much load.
#4
^^ Thanks for your suggestion, since its a large website and lots of real-time users I have to take action carefully. I'm sure something is wrong in config.

(2016-08-29, 4:56:43 am)Hidden Refuge Wrote:  CentOS 5.11 32 Bit with 6 GB RAM? You should use a newer CentOS version and 64 Bit with that much memory.

@admin yes already realized that. its really difficult for me to migrate even with Backupbuddy as there are lots of configs in server.
#5
@situnrocks

is this the wordpress site in question by any chance? Just trying to gather more info to better help you. About how many plugins are you using?
Giveaway Manager, FreeVPS Directory and Discussion

Also a big fan of Anime, see my poor taste here.
#6
(2016-08-29, 1:54:08 pm)Scáth Wrote:  @situnrocks

is this the wordpress site in question by any chance? Just trying to gather more info to better help you. About how many plugins are you using?
No, its a different website with 16 plugins of high memory eg AAM, Ad injection, Stream (live log of 3 logged in mods). Others are normal plugins eg jetpack, wp notif bar etc.
#7
In that case, as @HR said you are going to have to increase the amount of resources each worker thread can use, both on the NGINX side and php-fpm. I would also strongly recommend reinstalling a newer 64-bit OS as you are never going to be able to access more than 4GB RAM on a 32-bit OS (so you're wasting 2GB of your server memory).
Giveaway Manager, FreeVPS Directory and Discussion

Also a big fan of Anime, see my poor taste here.
#8
^^ Can you help me with "increase the amount of resources each worker thread can use, both on the NGINX side and php-fpm" ? How to
#9
Edit the main nginx config file (typically /etc/nginx/nginx.conf) and the php(5)-fpm config file (/etc/php{version}/fpm/php-fpm.conf).
Try adjusting the rlimit_files and process.max values in your php-fpm conf file. As a last resort you can choke the max cpu each process can use with rlimit_core, but that could negatively impact the load time of your site.
Giveaway Manager, FreeVPS Directory and Discussion

Also a big fan of Anime, see my poor taste here.
#10
Would you like to try setting more workers for php-fpm?
That would spread the load on more processes.
The config is on /etc/php-fpm.d/www.conf on centos systems afaik.

Try increasing pm.max_children, pm.max_spare_servers, pm.max_requests.

Also use varnish in front of nginx? You have quite a lot of ram. This would help with cpu usage I think.

Use also the latest version of php-fpm. (Custom compile it if it's not available in centos5)

If you have reddit, pm me. I'm /u/1Conan
I will be able to help during some of my classes and breaks.




Users browsing this thread: 1 Guest(s)