Why MySQL is using vSWAP and do not free it while there is free RAM?

Discussion in 'Site & Server Administration' started by postcd, Aug 11, 2016.

  1. #1
    [​IMG]

    It was using like 60%+ vSWAP for many days and after MySQL restart, it was freed. How can i make it free vSWAP when RAM is FREE?

    Is there any way to see which exact mysql data are in SWAP i mean so i can tweak proper mysql configuration variables or see which queries are the cause of the data in the SWAP? PS: mysqltuner already used.
     
    postcd, Aug 11, 2016 IP
  2. samirj09

    samirj09 Well-Known Member

    Messages:
    335
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    125
    #2
    samirj09, Sep 3, 2016 IP
  3. postcd

    postcd Well-Known Member

    Messages:
    1,043
    Likes Received:
    9
    Best Answers:
    1
    Trophy Points:
    190
    #3
    @samirj09
    Thx for advice! If anyone curious, i had/have it like this:
    # sysctl -a|grep swap
    vm.swappiness = 10
    vm.prune_pswap = 0
     
    postcd, Sep 10, 2016 IP