使用tune2fs 提高ext3多数据读写性能

本文介绍了Ext3文件系统的特性,包括最大文件数量限制、目录索引优化方法及XFS文件系统的相关资料。详细解释了如何通过调整Ext3设置来提高大量文件存储效率。
ext3介绍
http://en.wikipedia.org/wiki/Ext3#cite_note-0
The maximum number of inodes (and hence the maximum number of files and directories) is set when the file system is created. If V is the volume size in bytes, then the default number of inodes is given by V/213 (or the number of blocks, whichever is less), and the minimum by V/223. The default was deemed sufficient for most applications. The max number of subdirectories in one directory is fixed to 32000.

http://serverfault.com/questions/43133/filesystem-large-number-of-files-in-a-single-directory
Using tune2fs to enable dir_index might help. To see if it is enabled:

sudo tune2fs -l /dev/sda1 | grep dir_index
If it is not enabled:

sudo umount /dev/sda1
sudo tune2fs -O dir_index /dev/sad1
sudo e2fsck -D /dev/sda1
sudo mount /dev/sda1
But I have a feeling you might be going down the wrong path... why not generate a flat index and use some code to select randomly based on that. You can then use sub directories for a more optimized tree structure.

xfs介绍
http://xfs.org/index.php/XFS_Papers_and_Documentation
----------------------
ext3-handling-large-number-of-files-in-a-directory
http://roopindersingh.com/2008/05/10/ext3-handling-large-number-of-files-in-a-directory/
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值