-1

Is there a risk of doing:

vmtouch -dl /mysql-data-folder

On a production server with 192GB RAM and mysql data folder of 50GB.

What is vmtouch?

man vmtouch

vmtouch opens every file provided on the command line and maps it into virtual memory with mmap(2). The mappings are opened read-only. It recursively crawls any directories and does the same to all files it finds within them.

(tx @ipor for pointing out I should have included man vmtouch )

My goal is:

To achieve faster sql queries. I think keeping the mysql data folder in linux cache will result in 10 times faster reads compared to SSD. When data can be read faster the queries will return results faster everything else being the same.

My question is:

Am I increasing the chance of data loss if I keep the mysql data folder in the linux cache?

My opinion is:

No

My reasoning is:

There is no risk on writes since sync will be called by mysql and data will get written to disk.

What is the probability of unexpected shutdowns?

This is a production server and over the last 1 year the server had 2 unexpected shutdowns due to power trip at the colocation facility.

In both cases mysql did not have an error.

I want to make sure I am NOT increasing the risk of data loss.

0

man vmtouch:

vmtouch opens every file provided on the command line and maps it into virtual memory with mmap(2). The mappings are opened read-only. It recursively crawls any directories and does the same to all files it finds within them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.