问题原文
原帖链接 · Worker · CC BY-SA 3.0
I have a file based DB that has about 2M files stored in 3 levels of subdirectories.
2/2/6253
2/2/6252
...
File a vary from 30 bytes to 60 KB. Whole DB is Read Only. DB is about 125 Gigabytes big.
Added: All files are compressed by zlib (python)
I want to handle it all as one file with file system in it. Which file system would be my best choose?
At the moment I use following script:
dd if=/dev/zero of=/my_file.iso bs=1024K count=60000
mkfs.ext4 -f /my_file.iso
mount -o loop /my_file.iso /mnt/
已采纳解答
原帖链接 · ewwhite · CC BY-SA 3.0
You probably just want to use XFS.
It's quite capable of what you're asking for, and does the job.
There's no reason to complicate this with lesser-used filesystems, which can come with other tradeoffs.
Please see: How does the number of subdirectories impact drive read / write performance on Linux? and The impact of a high directory-to-file ratio on XFS
If you want something more esoteric, ZFS zvols with a filesystem on top could provide an interesting alternative (for compression, integrity and portability purposes).
See here: Transparent compression filesystem in conjunction with ext4
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
