Hi @billy_noah welcome to the community!
When MongoDB first uses WiredTiger as its storage engine, Ext4 was observed as having a specific behaviour that in pathological cases, resulted in multiple stalls (see SERVER-18314). I believe this issue is still present in one way or another with Ext4.
Specifically, the production notes mentions:
When running MongoDB in production on Linux, you should use Linux kernel version 2.6.36 or later, with either the XFS or EXT4 filesystem. If possible, use XFS as it generally performs better with MongoDB.
With the WiredTiger storage engine, using XFS is strongly recommended for data bearing nodes to avoid performance issues that may occur when using EXT4 with WiredTiger.
Since WiredTiger is the only storage engine shipped with MongoDB presently, XFS remains the recommended filesystem for WiredTiger until today.
Since the recommended setup is to have a node wholly dedicated to MongoDB for performance reasons, it’s probably easier maintenance-wise to just use XFS exclusively for the node hosting MongoDB so you don’t have to deal with multiple disks and different filesystems within a node (my opinion).
It is not recommended to run MongoDB together with other servers within the same node (e.g. app servers, web servers, another mongod
processes, etc.) since the mongod
process was designed to utilize all the node’s resources so that it can maximize the throughput of the hardware you have. Having another resource-intensive process running on the node may interfere with mongod
’s need for resources and may result in suboptimal performance. Having said that, not all application need the utmost performance, so depending on your use case, some compromise may be acceptable.
I would encourage you to read through the production notes in detail and follow all the recommended settings there. Additionally, please read through the security checklist as well to ensure your environment is secure.
Best regards
Kevin