Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-04-28, 01:30:47

Author Topic: High CPU usage  (Read 14560 times)

0 Members and 1 Guest are viewing this topic.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: High CPU usage
« Reply #15 on: 2014-05-16, 12:46:13 »
Your 'ps aux|grep mysql' is a normal service loaded.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline cvrle77

  • Junior Member
  • *
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Re: High CPU usage
« Reply #16 on: 2014-05-16, 12:48:06 »
So, all I need to switch from mod to php_fpm?


Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: High CPU usage
« Reply #17 on: 2014-05-16, 12:51:28 »
My recommendation is using php-fpm_event (for apache or -proxy). Lighttpd/Nginx/Hiawatha automatically using php-fpm.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline cvrle77

  • Junior Member
  • *
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Re: High CPU usage
« Reply #18 on: 2014-05-16, 12:59:27 »
Well, I am using nginxproxy since day one



So, if proxies are using php-fpm_event automatically, that means I was already using it.

I don't really think my sites are high traffic ones with 30-60 users online.

And even after switching, load is still unchanged. Also, this is SSD VPS, with IO of 300-600MB/s, so that isn't an issue here...

When I mentioned mysql, all I said is that in htop, before changes, I had 4 mysqld processes visible, and after change there were 8+, I never said mysql is an issue.
« Last Edit: 2014-05-16, 13:04:24 by cvrle77 »

Offline cvrle77

  • Junior Member
  • *
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Re: High CPU usage
« Reply #19 on: 2014-05-16, 13:16:06 »
Now after change, I have Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

error 500

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: High CPU usage
« Reply #20 on: 2014-05-16, 13:18:54 »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline cvrle77

  • Junior Member
  • *
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Re: High CPU usage
« Reply #21 on: 2014-05-16, 13:54:42 »
Did everything, but I see 0 improvement. Load still jumping on 1, and main processes php-fpm: pool admin are eating CPU. I have to stop httpd every time it reaches load of 1, so I don't get banned from hosting.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: High CPU usage
« Reply #22 on: 2014-05-16, 14:07:06 »
There something in your website application using cpu too high.

I am not sure, maybe you can limiting with 'ulimit'.

Inform here 'ulimit -a'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline cvrle77

  • Junior Member
  • *
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Re: High CPU usage
« Reply #23 on: 2014-05-16, 14:29:12 »
ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 7823
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 7823
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline cvrle77

  • Junior Member
  • *
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Re: High CPU usage
« Reply #25 on: 2014-05-16, 15:06:12 »
As I said in my first post

Quote
After my last venture  from here http://forum.mratwork.com/kloxo-mr-technical-helps/php-broke/ , I've noticed load increase from max 0.5 to 1.5+ which got me suspended from my VPS provider today, and don't know what caused this, since I haven't changed anything in my website setup.

I never touched anything on my VPS regarding websites (i've even disabled lots of stuff to see if plugins or theme is causing those issues), I had smooth config with kloxo mr, before I've updated everything, after that bad venture with trying to install APC.

At around 18th april there was some holiday, and I had over 70K PV and load of 0.3, I had more than 200 people  online at the same time, now when it comes close to 50 people online, load goes to 1, few people more and it goes up over 1. I have WP super cache installed, Better Wordpress Minify, static content is served all the time and I can see that in source by the date cache file is created.

I know this can work smooth, with waaaay lesser load on server, because I've had it, and lost that setup after updates...
« Last Edit: 2014-05-16, 15:14:31 by cvrle77 »

Offline merbot

  • Junior Member
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: High CPU usage
« Reply #26 on: 2014-05-16, 17:15:34 »
also
check this with mysqltuner

Offline I<3Kloxo

  • Senior Member
  • *
  • Posts: 205
  • Karma: +0/-0
    • View Profile
Re: High CPU usage
« Reply #27 on: 2014-05-16, 23:48:19 »
As I understand for web sites that have hight traffic it is better "php-fpm_event" ? Is that correct?

Edit:
I changed to php-fpm_event and I do not see any change regarding CPU.
« Last Edit: 2014-05-16, 23:53:03 by jure12 »

Offline I<3Kloxo

  • Senior Member
  • *
  • Posts: 205
  • Karma: +0/-0
    • View Profile
Re: High CPU usage
« Reply #28 on: 2014-05-19, 03:59:07 »
bump !

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: High CPU usage
« Reply #29 on: 2014-05-19, 04:03:44 »
Try 'sh /script/mysql-optimize --select=repair'. Maybe something wrong your database.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

 


Top 10 Social Networking:    Facebook    Twitter    LinkedIn    Pinterest    Google Plus    Tumblr    Instagram    VK    Flickr    Vine
Click Here

Page created in 0.048 seconds with 21 queries.

web stats analysis