Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


CPU Load 100% - Page 2
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

CPU Load 100%

2»

Comments

  • @muj said:
    LOIC, 20 threads. Even when I do it for 3 seconds it goes 100% :\

    I wouldn't call LOIC 'reasonable'. At your setting it's issued somewhere around 200 req/s.

    You have to tackle this elsewhere.

    1. static caching (ReallyStatic, varnish, nginx proxy cache)
    2. upstream to iptable filtering with limit.
    3. nginx HttpLimitReqModule (i.e. limit_req_zone)

    You probably lost some protection upstream (eg iptables) when you reinstalled. Unless php-fpm is stuck for more than 5 minutes with a 3 second test, I don't think PHP-FPM is the culprit here.

  • Maybe too much number of nginx worker and connection that php5-fpm cannot endure the request?

  • mujmuj Member

    @tchen said:

    I tried with 2 threads and still the same problem.

  • Out of curiosity, how long does it normally take for you to service just one request.

    And you say it stays at 100%, but how long does it actually stay there? Try one thread LOIC run for 1 second, then wait for the server to at least handle N requests (default=10) * T (time per request). If php is taking an order of magnitude longer than expected, then there's something more to delve into.

  • mujmuj Member
    edited August 2013

    I tested it again.

    With 1 thread for 1 seconds = Does nothing With 1 thread for 5 seconds = Goes to 80% then after 7 seconds goes normal With 5 thread for 5 seconds = Goes to 100% then after 13 seconds goes normal With 10 thread for 5 seconds = Goes to 100% then after 24 seconds goes normal With 15 thread for 5 seconds = Goes to 100% then after 26 seconds goes normal

    But isn't this bad if someone ddos, it will be down until I restart php-fpm.

  • You're hitting resource starvation and restarting php isn't going to solve it. You need to choose one of the solutions posted above. I personally prefer the nginx microcache method as that works for legit busy traffic as well. The best of course, is to have all three.

  • smansman Member
    edited August 2013

    @sman said:
    switch to apache :p
    @muj said:
    Should I?, I'm sure it needs more resources and there are security issues?

    Only issue there seems to be is the jihad between apache zealots and nginx zealots. Since when are there security issues? Seeing as how apache has been THE web server on the internet for going on decades now that's probably news to some people.

Sign In or Register to comment.