I wonder why disk_access_mode property is not in cassandra.yaml (looking into trunk right now). Do you all think we can add it there with brief explanation what each option does?
________________________________________ From: Caleb Rackliffe <[email protected]> Sent: Wednesday, September 6, 2023 21:08 To: [email protected] Subject: Re: [DISCUSS] Update default disk_access_mode to mmap_index_only on 5.0 NetApp Security WARNING: This is an external email. Do not click links or open attachments unless you recognize the sender and know the content is safe. +100 to this We'd have to come up w/ a pretty compelling counterexample to NOT switch the default to mmap_index_only at this point. On Wed, Sep 6, 2023 at 11:40 AM Brandon Williams <[email protected]<mailto:[email protected]>> wrote: Given https://issues.apache.org/jira/browse/CASSANDRA-17237<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FCASSANDRA-17237&data=05%7C01%7CStefan.Miklosovic%40netapp.com%7C37d5bb87f0764fd41b9208dbaf0cb9fc%7C4b0911a0929b4715944bc03745165b3a%7C0%7C0%7C638296241420889260%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=M95cg3dxp3Jk%2FkyaCd7uX61r2S0Q4X%2BA9G8LfSDnQUk%3D&reserved=0> I think it makes sense. At the least I think we should restore disk_access_mode so that users are more aware of the options available. Kind Regards, Brandon On Wed, Sep 6, 2023 at 10:50 AM Paulo Motta <[email protected]<mailto:[email protected]>> wrote: > > Hi, > > I've been bitten by OOMs with disk_access_mode:auto/mmap that were fixed by > changing to disk_access_mode:mmap_index_only. In a particular benchmark I got > 5x more read throughput on 3.11.x with disk_access_mode: mmap_index_only vs > disk_access_mode: auto/mmap. > > Changing disk_access_mode to mmap_index_only seems to be a common > recommendation on forums[1][2][3][4] and slack (find by searching > disk_access_mode in the #cassandra channel on > https://the-asf.slack.com/<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fthe-asf.slack.com%2F&data=05%7C01%7CStefan.Miklosovic%40netapp.com%7C37d5bb87f0764fd41b9208dbaf0cb9fc%7C4b0911a0929b4715944bc03745165b3a%7C0%7C0%7C638296241420889260%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2Fb595N375qIKg9EhU1CYXrmDbcQJFgBuSDuP6gyentg%3D&reserved=0>). > > It's not clear to me when using the default disk_access_mode:auto/mmap is > beneficial, perhaps only when the read set fits in memory? Mick seems to > think on CASSANDRA-15531 [5], that mmap_index_only has a higher heap cost and > should be only used when warranted. However it's not uncommon to see people > being bitten with OOMs or lower read performance due to the default > disk_access_mode, so it makes me think it's not the best fool-proof default. > > Should we consider changing default "auto" behavior of "disk_access_mode" to > be "mmap_index_only" instead of "mmap" in 5.0 since it's likely safer and > perhaps more performant? > > Thanks, > > Paulo > > [1] > https://stackoverflow.com/questions/72272035/troubleshooting-and-fixing-cassandra-oom-issue<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F72272035%2Ftroubleshooting-and-fixing-cassandra-oom-issue&data=05%7C01%7CStefan.Miklosovic%40netapp.com%7C37d5bb87f0764fd41b9208dbaf0cb9fc%7C4b0911a0929b4715944bc03745165b3a%7C0%7C0%7C638296241420889260%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=CuITOHvhAsaXYgDJF%2FIN%2BL%2FkFuqv9DnjrAcGb9ssv9g%3D&reserved=0> > [2] > https://phabricator.wikimedia.org/T137419<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fphabricator.wikimedia.org%2FT137419&data=05%7C01%7CStefan.Miklosovic%40netapp.com%7C37d5bb87f0764fd41b9208dbaf0cb9fc%7C4b0911a0929b4715944bc03745165b3a%7C0%7C0%7C638296241420889260%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2Bu2MQ7wCRuUt6vkkeCrO8bL4zbswNPb1WKx1yOFu56w%3D&reserved=0> > [3] > https://stackoverflow.com/a/55975471<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstackoverflow.com%2Fa%2F55975471&data=05%7C01%7CStefan.Miklosovic%40netapp.com%7C37d5bb87f0764fd41b9208dbaf0cb9fc%7C4b0911a0929b4715944bc03745165b3a%7C0%7C0%7C638296241420889260%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=XwqESgtkvitzcK1fR5mp1oy5eS622rVjWQfz%2B9xU%2F5U%3D&reserved=0> > [4] > https://support.datastax.com/s/article/FAQ-Use-of-disk-access-mode-in-DSE-51-and-earlier<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsupport.datastax.com%2Fs%2Farticle%2FFAQ-Use-of-disk-access-mode-in-DSE-51-and-earlier&data=05%7C01%7CStefan.Miklosovic%40netapp.com%7C37d5bb87f0764fd41b9208dbaf0cb9fc%7C4b0911a0929b4715944bc03745165b3a%7C0%7C0%7C638296241420889260%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Kh5RAH8Pci%2FEh3eFUfO5TdJvkfn8stSzRlg8tcNaV8U%3D&reserved=0> > [5] > https://issues.apache.org/jira/browse/CASSANDRA-15531<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FCASSANDRA-15531&data=05%7C01%7CStefan.Miklosovic%40netapp.com%7C37d5bb87f0764fd41b9208dbaf0cb9fc%7C4b0911a0929b4715944bc03745165b3a%7C0%7C0%7C638296241420889260%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=u5HTvtVI7bWkPUdcAanE2M5rg2uZbu2k9ggzX7RteHM%3D&reserved=0>
