title: XFS or ext4 filesystem mongodb server on Ubuntu machine?
body: <p>As XFS is the recommended by MongoDb from following link : <a href="https://docs.mongodb.com/manual/administration/production-notes/" rel="nofollow noreferrer">https://docs.mongodb.com/manual/administration/production-notes/</a></p>
  
  <blockquote>
    <p>MongoDB on Linux</p>
    
    <p>Kernel and File Systems</p>
    
    <p>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.</p>
    
    <p>With the WiredTiger storage engine, use of XFS is strongly recommended
    to avoid performance issues that may occur when using EXT4 with
    WiredTiger.</p>
    
    <p>With the MMAPv1 storage engine, MongoDB preallocates its database
    files before using them and often creates large files. As such, you
    should use the XFS or EXT4 file systems. If possible, use XFS as it
    generally performs better with MongoDB.</p>
  </blockquote>
  
  <p>And from Ubuntu link : <a href="https://askubuntu.com/questions/690360/help-me-choose-the-best-filesystem-for-my-pc">https://askubuntu.com/questions/690360/help-me-choose-the-best-filesystem-for-my-pc</a></p>
  
  <p>Ext4 file system is recommended for all Linux operating systems because has backwards compatibility with its predecessors, you can mount Ext2 and Ext3 as an Ext4 file system
  Ext4</p>
  
  <pre><code>reduces file fragmentation
  employs delayed allocation which helps with flash memory life as well as fragmentation.
  Good choice for SSDs and HDD
  </code></pre>
  
  <p>XFS</p>
  
  <pre><code>Good for a media file server because of constant throughput for large files.
  Most distributions require separate /boot partition because XFS and GRUB can be unpredictable
  Performance with small files is not as good.
  </code></pre>
  
  <p>So which one is better to use for mongodb on ubuntu 16.04
  .</p>