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

Need help optimizing my server

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Oxide, Apr 9, 2016.

  1. Oxide

    Oxide Active Member

    503
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    12:22 AM
    Hello, dear Community!

    I've recently installed a fresh install of Centmin on my brand new dedi from OVH.

    My server, will run mainly two IP Board Forums. I wonder what could I do to optimize my server, in general?

    Example, mariadb, csf, nginx.. From the default installation?

    What i would normally do would be using the MariaDB templates that Centmin offers. As well as changing Zend OP Cache and increase the limit to like 4GB more/less.

    More than that, I am not too sure what I could do?

    Specs:
    Intel Xeon E5-1630v3
    64 GB of RAM DDR4 ECC 2133 MHz
    2 x 480Gb SSD
     
    Last edited: Apr 9, 2016
  2. Oxide

    Oxide Active Member

    503
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    12:22 AM
    @Revenge you run IPS too, any help :) ?
     
  3. Revenge

    Revenge Active Member

    288
    64
    28
    Feb 21, 2016
    Portugal
    Ratings:
    +227
    Local Time:
    3:22 PM
    1.9.x
    10.1.x
    You don't need 4Gb in opcache for running 2 ips boards. With 128mb will reach about 60% with one board.

    I use fail2ban instead of csf, because im able to stop http flood attacks with it. Unfortunately, IPS don't have any protection against it, so we need to do it server side.

    As for the nginx configuration, centminmid is already very good out of the box. You can check @Jimmy thread about the vhost configuration for ips.

    For MariaDB configuration, i need more information. Post here your current my.cnf and mysqltuner 1.6.9 output.
     
  4. Oxide

    Oxide Active Member

    503
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    12:22 AM
    I have not moved it yet, but i will do once I have it set up. For now, I've grabbed the 32GB Template from github for mariadb.
     
  5. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    10:22 PM
    1.11
    10.2
    The first thing I would like to recommend is use Full SSD instead of Normal HDD.
     
  6. Oxide

    Oxide Active Member

    503
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    12:22 AM
    Yeah.

    I actually bought a new one after i made this topic, i realized you couldget SSD for a little more. Now i have 2 x 480GB SSD :D
     
  7. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    10:22 PM
    1.11
    10.2
    Nice. I expect 400mb IN/OUT Speed for that :)
    MariaDB will not suffer and don't need CPU much.
     
  8. Oxide

    Oxide Active Member

    503
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    12:22 AM
    [​IMG]
     
  9. Oxide

    Oxide Active Member

    503
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    12:22 AM
    Wow.

    I moved my first forum over. I've managed to half the loading time, from SyS Servers.. That's amazing.

    Has to be because of DDR4, Better CPU and better SSD? lol mostly DDR4, since i do php caching.
     
  10. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    10:22 PM
    1.11
    10.2
    Due to FAST CPU and SSD ;)
     
  11. Oxide

    Oxide Active Member

    503
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    12:22 AM
    My other server was also SSD.
     
  12. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    10:22 PM
    1.11
    10.2
    SoYouStart?
    But it is slow, average of 200 mbps I/O speed.
     
  13. Oxide

    Oxide Active Member

    503
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    12:22 AM
    Yep.

    Well, glad I moved from them now. They couldn't handle attacks, weird how they have different attack protection and both ran by OVH.
     
  14. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    10:22 PM
    1.11
    10.2
    What kind of attack did you received?
    They have the same protection.
    If it's layer 7, OVH/SYS can't protect much from that.
     
  15. Oxide

    Oxide Active Member

    503
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    12:22 AM
    Layer-4.

    The CPU was over heating, server crashed multiply times etc etc.

    OVH Protects from Layer-7, if you use them directly and not cloudflare..
     
  16. Revenge

    Revenge Active Member

    288
    64
    28
    Feb 21, 2016
    Portugal
    Ratings:
    +227
    Local Time:
    3:22 PM
    1.9.x
    10.1.x
    The server i have in SoYouStart almost doubles that.
     
  17. Oxide

    Oxide Active Member

    503
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    12:22 AM

    Code:
    [root@main-ovh ~]# perl mysqltuner.pl
    >>  MySQLTuner 1.6.7 - Major Hayden <major@mhtx.net>
    >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
    >>  Modified by George Liu (eva2000) at http://vbtechsupport.com/
    >>  Run with '--help' for additional options and output filtering
    
    [--] Skipped version check for MySQLTuner script
    [OK] Currently running supported MySQL version 10.0.24-MariaDB
    [OK] Operating on 64-bit architecture
    
    -------- System Linux Recommendations  ---------------------------------------
    Look for related Linux system recommandations
    [--] There is 15 listening port(s) on this server.
    [!!] There is too many listening ports: 15 > 10
    [!!] There is Apache like server running on 80 or 443 port.
    [OK] No Application server runing on 8080 or 8443 port.
    
    -------- Storage Engine Statistics -------------------------------------------
    [--] Status: +ARCHIVE +Aria +BLACKHOLE +CSV +FEDERATED +InnoDB +MEMORY +MRG_MyISAM +MyISAM +PERFORMANCE_SCHEMA
    [--] Data in MyISAM tables: 31M (Tables: 159)
    [--] Data in InnoDB tables: 26M (Tables: 164)
    [!!] Total fragmented tables: 13
    
    -------- Security Recommendations  -------------------------------------------
    [OK] There are no anonymous accounts for any database users
    [OK] All database users have passwords assigned
    [!!] There is no basic password file list!
    
    -------- CVE Security Recommendations  ---------------------------------------
    [--] Skipped due to --cvefile option undefined
    
    -------- Performance Metrics -------------------------------------------------
    [--] Up for: 4h 30m 2s (70K q [4.333 qps], 6K conn, TX: 473M, RX: 116M)
    [--] Reads / Writes: 75% / 25%
    [--] Binary logging is disabled
    [--] Total buffers: 9.9G global + 6.8M per thread (1000 max threads)
    [OK] Maximum reached memory usage: 9.9G (15.81% of installed RAM)
    [OK] Maximum possible memory usage: 16.5G (26.28% of installed RAM)
    [OK] Slow queries: 0% (0/70K)
    [OK] Highest usage of available connections: 0% (6/1000)
    [OK] Aborted connections: 0.03%  (2/6248)
    [OK] Query cache is disabled by default due to mutex contention.
    [OK] Sorts requiring temporary tables: 0% (5 temp sorts / 13K sorts)
    [!!] Joins performed without indexes: 443
    [OK] Temporary tables created on disk: 17% (742 on disk / 4K total)
    [OK] Thread cache hit rate: 99% (6 created / 6K connections)
    [OK] Table cache hit rate: 24% (419 open / 1K opened)
    [OK] Open file limit used: 2% (383/17K)
    [OK] Table locks acquired immediately: 99% (64K immediate / 64K locks)
    
    -------- ThreadPool Metrics --------------------------------------------------
    [--] ThreadPool stat is disabled.
    
    -------- Performance schema --------------------------------------------------
    [--] Performance schema is disabled.
    [--] Performance schema is enabled.
    
    -------- MyISAM Metrics ------------------------------------------------------
    [!!] Key buffer used: 18.8% (151M used / 805M cache)
    [OK] Key buffer size / total MyISAM indexes: 768.0M/3.3M
    [OK] Read Key buffer hit rate: 99.8% (485K cached / 803 reads)
    [!!] Write Key buffer hit rate: 87.2% (83K cached / 10K writes)
    
    -------- AriaDB Metrics ------------------------------------------------------
    [--] AriaDB is disabled.
    
    -------- InnoDB Metrics ------------------------------------------------------
    [--] InnoDB is enabled.
    [OK] InnoDB buffer pool / data size: 8.0G/26.0M
    [OK] InnoDB buffer pool instances: 8
    [!!] InnoDB Used buffer: 1.09% (5734 used/ 524280 total)
    [OK] InnoDB Read buffer efficiency: 99.99% (2961076 hits/ 2961240 total)
    [!!] InnoDB Write Log efficiency: 86.65% (120326 hits/ 138858 total)
    [OK] InnoDB log waits: 0.00% (0 waits / 18532 writes)
    
    -------- TokuDB Metrics ------------------------------------------------------
    [--] TokuDB is disabled.
    
    -------- Galera Metrics ------------------------------------------------------
    [--] Galera is disabled.
    
    -------- Replication Metrics -------------------------------------------------
    [--] No replication slave(s) for this server.
    [--] This is a standalone server..
    
    -------- Recommendations -----------------------------------------------------
    General recommendations:
        Consider dedicating a server for your database installation with less services running on !
        Consider dedicating a server for Web server in production !
        Run OPTIMIZE TABLE to defragment tables for better performance
        MySQL started within last 24 hours - recommendations may be inaccurate
        Adjust your join queries to always utilize indexes. Please note this
        calculation is made by adding Select_full_join + Select_range_check
        status values and triggered when the total >250
    Variables to adjust:
        join_buffer_size (> 2.0M, or always use indexes with joins)
     
  18. Revenge

    Revenge Active Member

    288
    64
    28
    Feb 21, 2016
    Portugal
    Ratings:
    +227
    Local Time:
    3:22 PM
    1.9.x
    10.1.x
    Your Database only occupies 60Mb? If that is your live database, there is no way for you to utilize the 64Gb of Ram your server have.
     
    • Like Like x 1
  19. Oxide

    Oxide Active Member

    503
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    12:22 AM
    LOL, yep.. Overkill, i guess.
     
  20. Revenge

    Revenge Active Member

    288
    64
    28
    Feb 21, 2016
    Portugal
    Ratings:
    +227
    Local Time:
    3:22 PM
    1.9.x
    10.1.x
    Ya, too much overkill.
    Well, but if you have the money to spend, there is nothing wrong with it.