3 ms·
We've had slowness on https://Clara.io https://Clara.io because of what we believe was excessive file system fragmentation as we were running on zfs and then la
by bhouston 12y ago
We've had slowness on https://Clara.io https://Clara.io because of what we believe was excessive file system fragmentation as we were running on zfs and then later brtfs. We were on zfs and brtfs because it allowed for easy and quick backups via snapshots. But eventually writes were slowed leading to long lock times and making everything basically unworkable. A reinstall would always fix the issue for a while. We believe that the same reasons that backups were fast, the copy on write feature, is the same reason we got excessive fragmentation after a while.
I believe it was because we were not using xfs as our file system, which we have recently moved over to. So far the issue hasn't re-occured.
Other than this issue, MongoDB has been pretty good. Indices are important and formulating queries so that they are index based is also important (the same result can be obtained in multiple ways, some of which likely do not use the indices, while other formulations will use them.)
We use Redis as a cache in front to reduce the unnecessary repetitive load on MongoDB for common operations.
We have MongoDB cluster setup and it has saved us a number of times. Also it is really just a live backup system -- we've had a few hardware failures and we still have never had to restore for an archive backup, we just resync from one of the failover servers. But using that is likely a no-brainer, and you are likely already doing it.
- s_kilk 12y agoWe had similar issues with MongoDB on btrfs. While the snapshot features were nice, the write performance was abysmal. We moved to xfs at some point and got a massive increase in write throughput. So far I've worked at two separate companies deploying MongoDB into production and we've never had any real issues, mostly because in both cases the lead engineers really knew what they were doing, had read the manual front-to-back, and they knew exactly what kind of OS and filesystem setup to use for maximum effectiveness.