Open sheaffej opened 3 years ago
If we are providing guidance to customers on setting up ext4, we should tune 2 additional settings to save over 5% of disk space at virtually no risk.
1) Reduce the reserved space. Setting it to 0 might be risky, but setting it to 1% should be fine. Cloudera similarly recommends this: https://docs.cloudera.com/cloudera-manager/7.4.2/managing-clusters/topics/cm-decrease-reserved-space.html. This change will save 4% of disk space.
2) Use a smaller bytes-per-inode
parameter. Storage team would have the best value to use here, but something like -i 131072
would be very conservative and save almost 1.25%.
John Sheaffer (sheaffej) commented:
I am seeing many customers struggling with IO performance on servers with locally attached disks, only to find they have the default file system mount options which are suboptimal for any RDBMS that stores data as files in a file system.
We should consider adding guidance on how to mount filesystems to hold the CockroachDB data files (i.e. the location specified by
--store
or the default of./cockroach-data
).Suggestion: In the Production Checklist consider adding verbiage such as the following: https://www.cockroachlabs.com/docs/v21.1/recommended-production-settings.html#storage
defaults,noatime,nodiratime,nobarrier
optionsmount -t ext4 -o defaults,noatime,nodiratime,nobarrier /dev/nvme0n1 /data
sudo sh -c "echo '/dev/nvme0n1 /data ext4 defaults,noatime,nodiratime,nobarrier 0 2' >> /etc/fstab"
defaults
,noatime
andnodiratime
options are recommended in all installationsnobarrier
option is recommended in the following situationsWhen ephemeral SSD storage (aka instance storage) is used in AWS, GCP and Azure
References:
Jira Issue: DOC-1577