3 ms·
Swapping made sense when we had computers with limited resources running multi-user workloads. Neither is now true. These servers are special purposed so they d
by toddh 15y ago
Swapping made sense when we had computers with limited resources running multi-user workloads. Neither is now true. These servers are special purposed so they don't need the overhead of a general OS at all. But aren't there two issues here? Swap and node allocation? Even without swapping wouldn't you have NUMA node allocation issues?
- andreasvc 15y agoThis is what I suspect, but in practice it seems not a good idea to just turn off swap: > DO NOT TURN OFF SWAP to prevent this. Your box will crawl, kswapd will chew up a lot of the processor, Linux needs swap enabled, lets just hope its not used. (from one of the blogs linked in the article). However, I can't find a clear explanation of why this is so.
- lawnchair_larry 15y agoThat was an old bug. It is perfectly fine to disable swap completely. It's the first thing we do on our servers, partly due to the issues detailed in this blog post, and partly due to it being archaic and useless when you have 128GB-512GB of ram.
- ataggart 15y agoThe two may be less distinct in the face of some approaches to minimizing remote reads/writes, e.g., replication of pages across domains. Apart from ensuring the cost of such replication is warranted, the dominant pressure against replication is the effect it has in increasing the memory footprint of the application, and thus possibly triggering more page faults.
- jeremycole 15y agoYes, they are two distinct issues which are somewhat conflated: the actual "swap insanity" and swap in general, and NUMA performance effects. I think for my purposes, the negative effects of NUMA are relatively hidden, so we only see the side effects. That is, it's impossible to know at this point whether optimization for NUMA would help MySQL, since no one has made a serious effort to do it. I suspect it would help quite a bit, if done right, and for the right query workload.