LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 964|回复: 12

为何同一个分区使用不同分区格式,显示容量大小不同?

[复制链接]
发表于 2009-5-16 14:14:10 | 显示全部楼层 |阅读模式
刚把主分区换成了ext4,原来是jfs,其实感觉没多大差别。

都是受蛊惑的。。

但是除了可用空间了解是因为预留%5给超级用户之外(-m 可以调整),但是磁盘容量也变化了,原来我算好的,jfs整10G,conky里面显示也是10.1之类的,现在ext4之后就只有9.88G了。df查看是9.9G

我想大概和族大小有关,一般族越大,性能越好,不过浪费磁盘空间。ext4一般使用多大的族?
发表于 2009-5-16 15:40:59 | 显示全部楼层
日志部分占用的容量不同而已
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-5-16 16:02:38 | 显示全部楼层
那ext4占用日志很大呢。。

无日志就对掉电,或者恢复数据有影响把。移动硬盘里面应该可以使用无日志的了。有UPS的可能也可以考虑无日志的ext4.

  1. A few weeks ago I posted a patch for discussion that allowed ext4 to run
  2. without a journal.  Since that time I've integrated the excellent
  3. comments from Andreas and fixed several serious bugs.  We're currently
  4. running with this patch and generating some performance numbers against
  5. both ext2 (with backported reservations code) and ext4 with and without
  6. a journal.  It just so happens that running without a journal is
  7. slightly faster for most everything.

  8. We did
  9. iozone -T -t 4 s 2g -r 256k -T -I -i0 -i1 -i2

  10. which creates 4 threads, each of which create and do reads and writes on
  11. a 2G file, with a buffer size of 256K, using O_DIRECT for all file opens
  12. to bypass the page cache.  Results:

  13.                      ext2        ext4, default   ext4, no journal
  14.   initial writes   13.0 MB/s        15.4 MB/s          15.7 MB/s
  15.   rewrites         13.1 MB/s        15.6 MB/s          15.9 MB/s
  16.   reads            15.2 MB/s        16.9 MB/s          17.2 MB/s
  17.   re-reads         15.3 MB/s        16.9 MB/s          17.2 MB/s
  18.   random readers    5.6 MB/s         5.6 MB/s           5.7 MB/s
  19.   random writers    5.1 MB/s         5.3 MB/s           5.4 MB/s

  20. So it seems that, so far, this was a useful exercise.
复制代码
回复 支持 反对

使用道具 举报

发表于 2009-5-16 16:06:04 | 显示全部楼层
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-5-16 16:22:08 | 显示全部楼层
看不出那比较比较出了什么东西。。
回复 支持 反对

使用道具 举报

发表于 2009-5-17 12:43:08 | 显示全部楼层
日志空间。默认5%的空间。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-5-17 12:50:52 | 显示全部楼层
ls说的应该是为超级用户预留的5%空间把。
回复 支持 反对

使用道具 举报

发表于 2009-5-17 14:03:04 | 显示全部楼层
一般都是4096
回复 支持 反对

使用道具 举报

发表于 2009-5-17 15:20:28 | 显示全部楼层
只是对ext2和ext3了解比较多,这两个系统中使用inode和block配合存储数据,并且inode和block和比例试预先分配好的。
若是文件系统小文件比较多,那么inode必然会使用过度,造成一个分区虽然剩余很多block,但是因为inode不足,所以不能继续存储数据,显然一部分空间被浪费了。同样,若是大文件很多,那么block也就消耗的很多,inode相对使用的很少,同样磁盘会被浪费。
当时对这样的分配方式很不理解,为什么inode的数量不能动态分配,估计是为了减少碎片和增加性能才使用了这种方式,不过的确对磁盘利用不充分。
回复 支持 反对

使用道具 举报

发表于 2009-5-17 19:26:58 | 显示全部楼层
Post by jarryson;1988155
ls说的应该是为超级用户预留的5%空间把。


恩,就是这个~~。

我一直以为是设置的日志空间。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表