ntfs-3g写入速度很慢?

2013-11-30 17:40:44 +08:00
 fuxkcsdn
系统Debian 7.2.0 AMD64
ntfs-3g 2012.1.15AR.5 external FUSE 29
CPU E3-1230 V2
内存 ECC 8G * 2

挂载在内部SATA接口上(sata_1),当格式化为ext4时,用rsync拷贝iso文件,平均速度可以达到150+MB/S
sent 23693369613 bytes received 31 bytes 163967956.01 bytes/sec

格式化为ntfs后,拷贝同样的文件,速度只有50+MB/S...这速度也差太多了吧...

sent 23693369613 bytes received 31 bytes 57718318.26 bytes/sec

ntfs格式传输的时候,CPU使用率也就40~50%左右

是ntfs-3g写入本来就那么慢??还是我哪里设置有问题??
6772 次点击
所在节点    问与答
7 条回复
orzfly
2013-11-30 17:53:14 +08:00
两个测试都是同步写入的没有开缓存么?
fuxkcsdn
2013-11-30 17:59:23 +08:00
@orzfly
具体操作步骤如下
# parted /dev/sdb
(parted) mklabel gpt
(parted) mkpart
(parted) ntfs
(parted) 0%
(parted) 100%
(parted) quit
# mkfs.ntfs -f /dev/sdb1
# mount.ntfs /dev/sdb1 /media/2t
# rsync -r --progress /home/user/test.iso /media/2t
# umount /media/2t
# mkfs.ext4 /dev/sdb1
# mount /dev/sdb1 /media/2t
# rsync -r --progress /home/user/test.iso /media/2t

都是默认的,没开什么缓存(除非是默认有开启)
fuxkcsdn
2013-11-30 18:01:10 +08:00
BTW,即使是在ext4复制完后,再格式化成ntfs,然后再测试,速度依旧
orzfly
2013-11-30 18:21:01 +08:00
试试在 rsync 完之后运行 time sync 强制缓存写入硬盘看看时间?

为了尽量准确记得在 rsync 之前先运行 sync 一下。
fuxkcsdn
2013-11-30 18:39:01 +08:00
@orzfly 速度一样是那么慢...

root@server:/# mkfs.ntfs -f /dev/sdb1
Cluster size has been automatically set to 4096 bytes.
Creating NTFS volume structures.
mkntfs completed successfully. Have a nice day.

root@server:/# parted -l
Model: ATA WDC WD2000FYYZ-0 (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 1049kB 2000GB 2000GB ntfs 2t

root@server:/# sync

root@server:/# mount.ntfs /dev/sdb1 /media/2t/

root@server:/# mount
/dev/sdb1 on /media/2t type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096)

root@server:/# sync

root@server:/# rsync -r --progress /home/user/test.iso /media/2t/
sending incremental file list
test.iso
23690477568 100% 55.78MB/s 0:06:45 (xfer#1, to-check=0/1)

sent 23693369613 bytes received 31 bytes 58430011.45 bytes/sec
total size is 23690477568 speedup is 1.00

root@server:/# time sync

real 0m0.361s
user 0m0.024s
sys 0m0.000s
orzfly
2013-11-30 20:51:16 +08:00
@fuxkcsdn 额,我的意思是指比较一下 ext4 和 NTFS 卷在 rsync 完成之后 sync 消耗的时间……

如果 ext4 支持缓存而 ntfs-3g 不支持缓存,那么前者在 sync 时会消耗一定时间而后者几乎不消耗时间。
orzfly
2013-11-30 20:52:23 +08:00
你看你商业软件 NTFS & HFS for Linux 8.9 Express 强制写入缓存花了 real 0m14.761s
而 ntfs-3g 的只花了 real 0m0.361s

很明显前者开了缓存后者没开缓存。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/91278

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX