2

Im triying to build up a new server for a service that saves the data on very small files of max 1 kb on the fs. The problem its, now we are using a block size of 4 kb and we are wasting a lot of space, so we are planning to change it to a new fs of max 1k block size.

The problem it is the partition its around 5.7 T, when i create the mkfs.ext4 command with the block size of 1024 it trown me the error

/dev/sda5: Cannot create filesystem with requested number of in odes

But if i change to 2048 its works perfect.

I tried to run with th 64bit flag, the e2fsprogs are on the last version, 1.42 something. Also i tried to set the in ode size from 1024 to 16365 and i had no luck.

Im running out of ideas, switching to another FS could be an option but i saw a lot of benchmarks and XFS or ZFS doesn't perform good as ext4 on small files :(

Any ideas?

Running centos 2.6.32-431.20.3.el6.x86_64

PsySkeletor
  • 181
  • 1
  • 13
  • 1
    Have you tried passing the `-N` option? See: http://unix.stackexchange.com/a/26600/1209 – Zoredache Jul 31 '14 at 23:46
  • note: [*One thing is that XFS doesn't perform well on millions of small sizes*](https://serverfault.com/a/505861/343888). 16384-byte inode is too large, and a file will consume a lot more space for metadata than the content itself. I think 2048 will be better, because your files are ~1KB and can be [inlined in the inodes themselves](https://en.wikipedia.org/wiki/Inode#Inlining) without allocating separate data blocks, therefore you save disk space and have better performance at the same time – phuclv Jul 22 '18 at 02:35

1 Answers1

0

Finally we went for XFS, it has not this problem with the block size and now the FS its happily running with 1 K Block size.

PsySkeletor
  • 181
  • 1
  • 13
  • You can doesn’t mean you should. Doing non-standard block sizes you’re basically begging for troubles as lots (most?) of apps were never tested against these numbers. FYI. – BaronSamedi1958 Jul 26 '20 at 21:15