Page MenuHomePhabricator

Discussion: Use XFS for Cassandra data partition?
Closed, DeclinedPublic

Description

The XFS filesystem is generally known for good performance when working with large files. Cassandra SSTables fit that description, which is why a variety of reputable sources recommend XFS for Cassandra data partitions.

We are currently reimaging nodes for multi-instance operation. I think it is worth using this opportunity to configure those nodes to use XFS. As far as I can tell, all it would take is a small patch in puppet/modules/install_server/files/autoinstall/partman/.

Earlier IRC discussion

[10:11] <gwicke> I have seen others recommend this, and it seems to make sense as cassandra sstables are basically large files written sequentially
[10:11] <gwicke> example: https://tobert.github.io/pages/als-cassandra-21-tuning-guide.html
[10:11] <gwicke> /cc urandom ^^
[10:12] <gwicke> https://books.google.com/books?id=6Q68AQAAQBAJ&pg=PT182&lpg=PT182&dq=cassandra+xfs&source=bl&ots=XplnkYkubr&sig=aaVMaHC52sxFhFg76Z1qgcDGCdc&hl=en&sa=X&ved=0ahUKEwi506T8oLvJAhVQ32MKHQEqB1EQ6AEIZTAM#v=onepage&q=cassandra%20xfs&f=false
[10:13] <godog> I'm not opposed in principle, but I'd like to see evidence that we have an actual problem or might in the future
[10:14] <gwicke> the selling point is that XFS tends to perform better for this kind of workload, and is as mature as ext4
[10:14] <gwicke> we use it for other similar workloads as well
[10:16] <godog> might be, my experience with swift and high load due to xfs deadlocks has been different
[10:17] <gwicke> a quick grep suggests that it's being used for dbs, elasticsearch, graphite, backend varnishes
[10:19] <gwicke> I don't feel super strongly about it, just thought that the re-image could be a good opportunity to tweak this
[10:21] <gwicke> the scylladb folks recommend xfs as well, and they are quite knowledgeable about linux internals and performance
[10:23] <gwicke> "DataStax recommends deploying Cassandra on XFS or ext4." -- http://docs.datastax.com/en/cassandra/2.1/cassandra/planning/architecturePlanningHardware_c.html
[10:25] <godog> I'm of the opinion of not introducing differences if we can avoid it, but if there's a case to be made that it performs better than ext4 for us then for sure

Event Timeline

GWicke raised the priority of this task from to Medium.
GWicke updated the task description. (Show Details)
GWicke added projects: SRE, Services.
GWicke added subscribers: GWicke, fgiunchedi, Eevans and 2 others.
GWicke renamed this task from Consider using XFS for Cassandra data partition to Discussion: Use XFS for Cassandra data partition?.Dec 1 2015, 7:17 PM
GWicke set Security to None.

+1 to XFS.

<godog> I'm of the opinion of not introducing differences if we can avoid it, but if there's a case to be made that it performs better than ext4 for us then for sure

Case in point: XFS has been built for large(r) storage systems, while the ext family's focus are end-consumer products (but they try their best to be able to run on the former as well). Given our storage needs and I/O intensity, I think we should switch to XFS. Or rather, we should have been on XFS to begin with and argue about whether switching to ext4 would make sense ;)

as I said, let's first determine if we have a problem with ext4 before committing resources