It is necessary to set swap file for FreeBSD MySQL server

MySQL dedicated server, configured with 4-core 16g memory
Is it necessary to set the swap file on the FreeBSD ECS?
Welcome to make some suggestions, thank you!
 
If you search for MySQL swap information on these forums then you'll find that MySQL does cause FreeBSD to swap under certain workloads. In my case importing/export millions of small rows seems to make swap get used.

11.X was OK, 12.X had issues, 13.X is a lot better but there might still be some issues.

If you are tempted to give MySQL a lot of that memory, then it will be more likely to hit swap from what I've seen. So you might need to set MySQL buffers lower than you might anticipate and try increasing them gently if required.

Having a bit of swap gives you some room to spot and fix issues, so personally, yes, I'd recommend it. YMMV.
 
Back
Top