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

Sysadmin high memory usage for mysql?

Discussion in 'System Administration' started by upgrade81, Mar 23, 2018.

  1. upgrade81

    upgrade81 Premium Member Premium Member

    107
    5
    18
    Sep 5, 2016
    Italy
    Ratings:
    +6
    Local Time:
    5:33 AM
    1.13.8
    10
    hi guys, there is a precise way to see what the hell is consuming so much ram on mysql?

    there are only 2 wordpress sites on this vm!
    grabilla.g31632.png
     
  2. eva2000

    eva2000 Administrator Staff Member

    33,688
    7,459
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,470
    Local Time:
    1:33 PM
    Nginx 1.13.x
    MariaDB 5.5
    How much memory mysql uses depends on how much memory you allocate to mysql buffers in /etc/my.cnf and how much memory you need to allocate depends on how much memory your mysql using applications require for optimal performance.

    Centmin Mod auto tunes and optimises mysql settings in /etc/my.cnf based on server hardware and resources detected at initial install time meaning memory allocation depends ultimately on amount of memory installed on server. So out of box is will be normal for mysql to use memory due to Centmin Mod auto tuned/optimisated allocation and your mysql web app usage. ~5.8% total memory usage for mysql is well within normal.

    You can tune your /etc/my.cnf yourself to lower memory usage at a potential risk for also lowering mysql performance as well. @deltahf experienced first hand what not using Centmin Mod auto tuned /etc/my.cnf settings can result in = 5x times slower mysql response time performance MariaDB - MariaDB 10.1 Slower After Upgrading From 5.5
     
    • Like Like x 1
    • Agree Agree x 1
  3. upgrade81

    upgrade81 Premium Member Premium Member

    107
    5
    18
    Sep 5, 2016
    Italy
    Ratings:
    +6
    Local Time:
    5:33 AM
    1.13.8
    10
    ok, but the Virt memory?
     
  4. eva2000

    eva2000 Administrator Staff Member

    33,688
    7,459
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,470
    Local Time:
    1:33 PM
    Nginx 1.13.x
    MariaDB 5.5
    Memory used is RSS/RES not Virt/VSZ - see difference ps output - Difference between VSZ vs RSS memory usage - LinuxConfig.org

     
    • Like Like x 1
    • Informative Informative x 1
  5. upgrade81

    upgrade81 Premium Member Premium Member

    107
    5
    18
    Sep 5, 2016
    Italy
    Ratings:
    +6
    Local Time:
    5:33 AM
    1.13.8
    10
    I asked you this question because in other vm with centmin I do not have all this Virt memory Busy.

    it is always around 33% not 80%
     
  6. eva2000

    eva2000 Administrator Staff Member

    33,688
    7,459
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,470
    Local Time:
    1:33 PM
    Nginx 1.13.x
    MariaDB 5.5
    so optimised buffer allocation will differ between installs as auto tuning is dynamic
     
..