Join the community today
Become a Member

MariaDB My.cnf configuration script after ram upgrade/downgrade ?

Discussion in 'Install & Upgrades or Pre-Install Questions' started by negative, Oct 1, 2018.

  1. negative

    negative Premium Member Premium Member

    230
    23
    18
    Apr 11, 2015
    Ratings:
    +51
    Local Time:
    8:56 PM
    1.9.10
    10.1.11
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • MariaDB MySQL Version Installed: 10.2.xx
    • When was last time updated Centmin Mod code base ? : today
    • Persistent Config: no
    @eva2000
    I've installed my centminmod with 48GB ram on server, but now i go downgrade my RAM to 32GB. As we know, centminmod installer script configuring the my.cnf mysql configuration file while installing and it sets all variables based on server configuration (core count, ram amount etc.) So when i look the my.cnf, lots of settings has been set for my current server configuration. And it works perfectly optimized !

    But now, i go downgrade my RAM to 32 gb from 48gb. And i can change my cpu configuration too in future. Some variables may need change based my new RAM configuration for better /optimized performance.

    So, is there any custom script or run manual command about set my.cnf again with new configuration ?

    Thanks
     
  2. eva2000

    eva2000 Administrator Staff Member

    36,387
    7,992
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,304
    Local Time:
    3:56 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    There isn't a script or command to do 100% of re-optimisations but for between 32-64GB ram the base template my.cnf is the same, just some of the values are auto tuned based of detected server resources etc.

    For PHP-FPM, you can recompile PHP via centmin.sh menu option 5 so auto redetects memory and server resources and manually re-run /usr/local/src/centminmod/tools/setio.sh as follows
    Code (Text):
    /usr/local/src/centminmod/tools/setio.sh set
    

    which will recalculate MariaDB MySQL innodb I/O variable values to set

    i.e.
    Code (Text):
    /usr/local/src/centminmod/tools/setio.sh set
    Full Reads: 24975
    Full Writes: 59362
    
    set innodb_flush_neighbors = 0
    
    innodb_io_capacity = 2900
    
    +------------------------+-------+
    /etc/my.cnf adjustment
    +------------------------+-------+
    existing value:
    Variable_name   Value
    innodb_io_capacity      2700
    innodb_io_capacity_max  5400
    new value:
    Variable_name   Value
    innodb_io_capacity      2900
    innodb_io_capacity_max  5800
    
    +------------------------+-------+
    innodb io threads adjustment
    +------------------------+-------+
    existing value:
    +------------------------+-------+
    innodb_read_io_threads = 2
    innodb_write_io_threads = 2
    +------------------------+-------+
    new value:
    +------------------------+-------+
    innodb_read_io_threads = 2
    innodb_write_io_threads = 2
    +------------------------+-------+
    
    Restart MySQL server for io thread changes
    
     
  3. negative

    negative Premium Member Premium Member

    230
    23
    18
    Apr 11, 2015
    Ratings:
    +51
    Local Time:
    8:56 PM
    1.9.10
    10.1.11
    so, when i change the cpu/ram, i should run only the "/usr/local/src/centminmod/tools/setio.sh" Other variables is same as ideal.
     
  4. eva2000

    eva2000 Administrator Staff Member

    36,387
    7,992
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,304
    Local Time:
    3:56 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    setio.sh is only for change in SSD/disk performance (which changes over time) not related to cpu/ram
     
  5. negative

    negative Premium Member Premium Member

    230
    23
    18
    Apr 11, 2015
    Ratings:
    +51
    Local Time:
    8:56 PM
    1.9.10
    10.1.11
    I guess too so i'm confused.

    Finally and shortly, i think your advice is leave same configuration on my.cnf when i downgrade/upgrade RAM between 32 and 64. Isn't it?
     
  6. eva2000

    eva2000 Administrator Staff Member

    36,387
    7,992
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,304
    Local Time:
    3:56 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    yup
     
..