I’m writting this message to see if anyone has gone through the same issues as me, and found any solution.
I have a disk from long time ago, formatted with Ext4. When I decided to update my Storj rig and start more than one node, I started spinning up all nodes in the same disk (I know, not something supported by Storj) and then moved them to new disks once I got them.
My current situation is that the disk that holded all nodes at the beginning (which was never close to completely filled) is much much slower than other disks.
I use to run a
du on the disk before starting the node, so the
filewalker goes as smooth as possible thanks to kernel caches.
Well, on that disk the performance of
du is like 100 times worse, so it is impossible to complete in less than the time the kernel takes to discard the cache entries. So on that node, when it starts the iowait starts to grow and the load average of the system also grows because of that.
Investigating a bit, I saw that on the
e2fsck report ~50% of firectories of the disk are
non-contiguous, which means the inode of the directory is fragmented.
Any advice about how to deal with it?
The only advice I could found on the internet is to copy all contents to a different folder and remove the original one to force the filesystem to reorder, but that is a bit difficult as the deletion of the previous folder would take a lot because of the fragmentation.
I’m also wondering how other filesystems will behave with this situation, I’m even thinking about moving everything to ZFS with a good SSD metadata cache (I can have ~128 GB of RAM on that machine, currently running an i5 10500).
I have also submitted this feature request to be voted: