Want to subscribe to topics you're interested in?
Become a Member

MariaDB CPU Intensive with XenForo

Discussion in 'Install & Upgrades or Pre-Install Questions' started by Oxide, Jun 16, 2015.

  1. rdan

    rdan Well-Known Member

    5,452
    1,418
    113
    May 25, 2014
    Ratings:
    +2,212
    Local Time:
    2:50 PM
    Mainline
    10.2
    Ramnode has DDOS protection.

     
  2. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    4:50 PM
    Well it was only around 10-15 requests, what if i got 30? it would take down the server..

    I have no idea what the issue is rlly.
     
  3. eva2000

    eva2000 Administrator Staff Member

    58,907
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    4:50 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
  4. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    4:50 PM
  5. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    4:50 PM
    You got it right buddy.

    I posted a picture. Any idea what I can do? Never knew it would hog cpu.
     
  6. rdan

    rdan Well-Known Member

    5,452
    1,418
    113
    May 25, 2014
    Ratings:
    +2,212
    Local Time:
    2:50 PM
    Mainline
    10.2
    Change your php-fpm.conf to this:
     
  7. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    4:50 PM
    Thanks, but didn't do anything.
     
  8. rdan

    rdan Well-Known Member

    5,452
    1,418
    113
    May 25, 2014
    Ratings:
    +2,212
    Local Time:
    2:50 PM
    Mainline
    10.2
    Did you restart php-fpm?
    fpmrestart command.
     
  9. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    4:50 PM
    indeed

    service php-fpm restart
     
  10. rdan

    rdan Well-Known Member

    5,452
    1,418
    113
    May 25, 2014
    Ratings:
    +2,212
    Local Time:
    2:50 PM
    Mainline
    10.2
    I just configured a server with 2 CPU core only, with medium traffic.
    The best settings I got is this:
    Code:
    pm = static
    pm.max_children = 2
    

    So for your VPS with 4 cpu core, use this:
    Code:
    pm = static
    pm.max_children = 4
    
    or
    Code:
    pm = static
    pm.max_children = 2
    
    To give other cores to other process.
    Just don't use more than your CPU core.
     
  11. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    8:50 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    @RoldanLT - what about mine?
    Code:
    pm = ondemand
    pm.max_children = 16
    ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
    pm.start_servers = 8
    pm.min_spare_servers = 4
    pm.max_spare_servers = 12
    pm.max_requests = 1000
    i google it, and if pm = ondemand then only relevant setting is pm.max_children.
    When I use formula, it can be 18 for my configuraton
     
  12. rdan

    rdan Well-Known Member

    5,452
    1,418
    113
    May 25, 2014
    Ratings:
    +2,212
    Local Time:
    2:50 PM
    Mainline
    10.2
    and your server specs?
    CPU available?
     
  13. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    8:50 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    Disk Space - 60 Gb SSD
    Ram - 4 GB
    2 CPU
    swap 2GB
    Centmin Mod 1.2.3-eva2000.08
    redis server and cache
    zendOp cache
    pfp 5.6.15
    mariaDB 10.x
     
  14. rdan

    rdan Well-Known Member

    5,452
    1,418
    113
    May 25, 2014
    Ratings:
    +2,212
    Local Time:
    2:50 PM
    Mainline
    10.2
    I assume this if from DO?
    Try this:
    Code:
    pm = dynamic
    pm.max_children = 8
    pm.start_servers = 2
    pm.min_spare_servers = 1
    pm.max_spare_servers = 4
     
  15. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    8:50 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    yep
    if pm = ondemand then only relevant setting is pm.max_children
    Did you tried that way?
     
  16. rdan

    rdan Well-Known Member

    5,452
    1,418
    113
    May 25, 2014
    Ratings:
    +2,212
    Local Time:
    2:50 PM
    Mainline
    10.2
    Yes.
    ondemand is only good if you have small traffic.
     
  17. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    8:50 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    XenForo - 1.5.1
    Database - 831 MB (about 126 MB zipped)
    Number of attachments - 3,601
    Attachments disk usage - 9,737 MB
    Addons - 66
    Posts - 243,337
    Users - 3,613 (online registered users in peak time is about 50 + guests)

    my forum is not with small traffic, so your settings should be better?
    pm = dynamic
    pm.max_children = 8
    pm.start_servers = 2
    pm.min_spare_servers = 1
    pm.max_spare_servers = 4
     
  18. rdan

    rdan Well-Known Member

    5,452
    1,418
    113
    May 25, 2014
    Ratings:
    +2,212
    Local Time:
    2:50 PM
    Mainline
    10.2
    (y)
     
  19. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    8:50 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    I will add this settings, and when finally transfer forum from old server, we shall see how it will be
     
  20. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    8:50 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    what about pm.max_requests = 1000