I think there is some potential yak shaving to worrying excessively about swap. The reality is that you should know the memory demands of what you are running on your C* nodes and have things configured so that significant swap would be a highly abnormal situation.
I'd expect to see excessive churn on buffer cache long before I'd see excessive swap kicking in, but sometimes a little swap usage doesn't mean much beyond the O/S detecting that some memory allocation is so stale that it may as well push it out of the way. This can happen for perfectly reasonable situations if, for example, you make heavy use of crond for automating system maintenance. Also, if you are running on Dell boxes, Dell software updates can get a bit cranky and you see resource locking that has zilch to do with your application stack. I'd worry less about how to crank down swap beyond the advice to make it a last resort, and more about how to monitor and alert on abnormal system behavior. When it's abnormal, you want a chance to see what is going on so you can fix it. OOM'ing problems out of visibility makes it hard to investigate root causes. I'd rather be paged while the cause is visible, than be paged anyways for the down node and have nothing to inspect. R On 4/17/20, 6:12 AM, "Alex Ott" <alex...@gmail.com> wrote: Message from External Sender I usually recommend following document: https://urldefense.proofpoint.com/v2/url?u=https-3A__docs.datastax.com_en_dse_5.1_dse-2Ddev_datastax-5Fenterprise_config_configRecommendedSettings.html&d=DwIFaQ&c=9Hv6XPedRSA-5PSECC38X80c1h60_XWA4z1k_R1pROA&r=OIgB3poYhzp3_A7WgD7iBCnsJaYmspOa2okNpf6uqWc&m=TQPtBiV2cZow-OW1xEFTxqIlaA6VWPwM9PbMdScHIGw&s=_YR4k-l76UU-LxTd7WCtHAV6_LdRP2qzNiBAD1dAzdU&e= - it's about DSE, but applicable to OSS Cassandra as well... Kunal at "Thu, 16 Apr 2020 15:49:35 -0700" wrote: K> Hello, K> K> I need some suggestion from you all. I am new to Cassandra and was reading Cassandra best practices. On one document, it was K> mentioned that Cassandra should not be using swap, it degrades the performance. K> My question is instead of disabling swap system wide, can we force Cassandra not to use swap? Some documentation suggests to use K> memory_locking_policy in cassandra.yaml. K> How do I check if our Cassandra already has this parameter and still uses swap ? Is there any way i can check this. I already K> checked cassandra.yaml and dont see this parameter. Is there any other place i can check and confirm? K> Also, Can I set memlock parameter to unlimited (64kB default), so entire Heap (Xms = Xmx) can be locked at node startup ? Will that K> help? K> Or if you have any other suggestions, please let me know. K> K> K> Regards, K> Kunal K> -- With best wishes, Alex Ott Principal Architect, DataStax https://urldefense.proofpoint.com/v2/url?u=http-3A__datastax.com_&d=DwIFaQ&c=9Hv6XPedRSA-5PSECC38X80c1h60_XWA4z1k_R1pROA&r=OIgB3poYhzp3_A7WgD7iBCnsJaYmspOa2okNpf6uqWc&m=TQPtBiV2cZow-OW1xEFTxqIlaA6VWPwM9PbMdScHIGw&s=ddXQN2wa2-ikDaE4LFM7Z-g-V369ObwXmt6_BeWRXPU&e= --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org For additional commands, e-mail: user-h...@cassandra.apache.org