- 论坛徽章:
- 13
|
本帖最后由 ulovko 于 2012-04-23 09:56 编辑
引文:- Blocks are segments of disk that contain data. FreeBSD defaults to 16KB
- blocks. Not all files are even multiples of 16KB, so FFS uses fragments to store
- leftovers. The standard is one-eighth of the block size, or 2KB. For example,
- a 20KB file would fill one block and two fragments.
复制代码 如果是LINUX系统直接修改 block size 即可 (支持:1K 2K 4K)需要重新格式化加上参数: block 大小值
BSD:
继续引文:- FreeBSD defaults to using 16KB blocks and 2KB fragments.
- We talked about UFS2 design back in Chapter 8. The defaults are a
- good average on most modern systems. If you have a special-purpose filesystem
- that will only hold files of an unusual size, you might want to change the
- block size. For example, if your application uses millions of files that are only
- 6KB each, it makes sense to change the block size to 8KB. The minimum size
- is 4KB. If your application will use only a few files, but they’re monstrously
- huge, you might want to use 32KB or even 64KB blocks. One word of warning,
- however: FreeBSD expects the fragment size to be exactly one-eighth of the
- block size. Using another ratio for block:fragment size reduces performance.
复制代码 上面意思是:一定要确保 block size/fragments ==1:8 否则性能有影响,
其实上面说的很清楚,你的文件很小那么到底是多大的?
修改方法:- # disklabel /dev/da0s1
- # /dev/da0s1:
- 8 partitions:
- # size offset fstype [fsize bsize bps/cpg]
- b: 1G * swap
- c: 17767827 0 unused 0 0 # "raw" part, don't edit
- d: 2G * 4.2BSD 2048 16384 28552
- e: 2G * 4.2BSD
- f: * * 4.2BSD
复制代码 有点混乱是把?看不清阿!
给你书,自己看看吧!
有点大,等我分包!
|
|