Ad Widget

Collapse

Storing temporary MySQL files in tmpfs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • GeorgeKup
    Member
    • Nov 2019
    • 98

    #1

    Storing temporary MySQL files in tmpfs

    Hello. I use MariaDb 10.4 and I want to use the storage of temporary MySQL files in tmpfs with the goal of increasing performance, for example like this:

    tmpfs / var / lib / mysql / tmp tmpfs rw, gid = 27, uid = 27, size = 1G, nr_inodes = 10k, mode = 0700 0 0
    however, there is information regarding MySQL- article https://planet.mysql.com/entry/?id=2181114:

    - tmpdir - sometimes it's a good idea to point tmpdir to / dev / shm so that on-disk temporary tables are actually written to memory, but there's one important caveat starting with MySQL 5.5: if you do that, it disables AIO acorss the board , because tmpfs does not support AIO. So I would monitor the activity on current tmpdir (/ tmp usually) and only switch it to / dev / shm if I see it being an issue.
    from which it follows that on new versions of MySQL it is not advisable to store temporary MySQL files in tmpfs.

    Can someone share their experience - is it possible to apply the above-described method of increasing performance on the latest versions of MySQL or MariaDB?
  • ingus.vilnis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2014
    • 908

    #2
    Hi,

    How many NVPS do you process in Zabbix?

    How do you know that this particular storage aspect is the bottleneck of your database performance?

    Do you already monitor some MySQL internal metrics?

    Comment

    Working...