Optimizing file system for lots of small files?

3

1

I have a drive containing 122,865 image files that are about 82.1 GB total. However they use 171 GB of space on disk. The average file size is about 717KB. Since I intend to continue adding more files of this size I would like to reformat my drive with a new file system or alter the existing one to better accommodate these small files. The drive is currently running ext4 with the defaults provided by ArchLinux's mkfs.ext4. I am not the slightest bit certain on where to begin with solving this, can anyone point me in the right direction or provide some resources for me to work with.

TheDarkVoid

Posted 2017-02-23T01:05:05.990

Reputation:

Answers

4

The smaller the block size (1024 bytes, p.e.), the better for efficient disk usage, in case there's a lot of small files on that partition. Try to reformat that partition with the smallest block size:

mkfs.ext4 -b 1024 /dev/your_partition

Roberto Paz

Posted 2017-02-23T01:05:05.990

Reputation: 72

1

Some time ago it was very common to use ReiserFS for that type of cases. I have no experience with it but I know that :)

tin

Posted 2017-02-23T01:05:05.990

Reputation: