+ -
当前位置:首页 → 问答吧 → 为何同一个分区使用不同分区格式,显示容量大小不同?

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

时间:2009-05-16

来源:互联网

刚把主分区换成了ext4,原来是jfs,其实感觉没多大差别。

都是受蛊惑的。。

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

我想大概和族大小有关,一般族越大,性能越好,不过浪费磁盘空间。ext4一般使用多大的族?

作者: jarryson   发布时间: 2009-05-16

日志部分占用的容量不同而已

作者: k_f   发布时间: 2009-05-16

那ext4占用日志很大呢。。

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

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

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

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

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

So it seems that, so far, this was a useful exercise.

作者: jarryson   发布时间: 2009-05-16

http://en.wikipedia.org/wiki/Comparison_of_file_systems

作者: tony2u   发布时间: 2009-05-16

看不出那比较比较出了什么东西。。

作者: jarryson   发布时间: 2009-05-16

日志空间。默认5%的空间。

作者: firefoxmmx   发布时间: 2009-05-17

ls说的应该是为超级用户预留的5%空间把。

作者: jarryson   发布时间: 2009-05-17

一般都是4096

作者: zhuqin_83   发布时间: 2009-05-17

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

作者: zmwgreenrain   发布时间: 2009-05-17

引用:
作者: jarryson
ls说的应该是为超级用户预留的5%空间把。
恩,就是这个~~。

我一直以为是设置的日志空间。

作者: firefoxmmx   发布时间: 2009-05-17

引用:
作者: jarryson
刚把主分区换成了ext4,原来是jfs,其实感觉没多大差别。
ext4 is Fourth extended file system, deriving from ext2 and ext3. It has a journal, but not jfs!

ps: jfs is a type of journal file system developed by IBM,
howerver, it already stops going on.

作者: quxtilf   发布时间: 2010-06-13

引用:
作者: quxtilf
ext4 is Fourth extended file system, deriving from ext2 and ext3. It has a journal, but not jfs!

ps: jfs is a type of journal file system developed by IBM,
howerver, it already stops going on.
他是说他以前用的jfs...

应该就是inode和日志的问题, 楼主可以试着关掉日志看看

作者: adaml   发布时间: 2010-06-13

有惨痛丢失数据的经历,这里劝告楼主,宁可花50%的空间用于备份,也不要为了那区区5%去牺牲数据的安全。

作者: jobinson99   发布时间: 2010-06-13

热门下载

更多