Strange write speed between /file and /tmp/file (may be related to 4k advanced format)
Patrick Dung
patrick_dkt at yahoo.com.hk
Thu Oct 24 15:37:22 UTC 2013
Hi,
I have a FreeBSD 9.2 64 bit installed in a VM.
The host is Windows 7 with vmware workstation, the host is using an advanced format (4k) harddisk.
I have noticed there is strange write speed between /file and /tmp/file.
/dev/da0p3 is UFS2 created by default installer.
I am thinking if the problem is caused by disk alignment.
da0p3 starting sector is 786594, which seems not aligned by 4k (786594 *512/4096=98324.25)
The dd result is repeatable.
[root at testing2 /]# df -P
Filesystem 512-blocks Used Avail Capacity Mounted on
/dev/da0p3 6518712 4621000 1376216 77% /
devfs 2 2 0 100% /dev
fdescfs 2 2 0 100% /dev/fd
procfs 8 8 0 100% /proc
host:hgfs 591368064 405571456 185796608 69% /mnt-hgfs
[root at testing2 /]# gpart show da0
=> 34 7548861 da0 GPT (3.6G)
34 128 1 freebsd-boot (64k)
162 786432 2 freebsd-swap (384M)
786594 6760448 3 freebsd-ufs (3.2G)
7547042 1853 - free - (926k)
[root at testing2 /]# dd if=/dev/zero of=/tmp/file bs=50M count=4
4+0 records in
4+0 records out
209715200 bytes transferred in 10.303288 secs (20354202 bytes/sec)
[root at testing2 /]# rm /tmp/file
[root at testing2 /]# dd if=/dev/zero of=/tmp/file bs=50M count=4
4+0 records in
4+0 records out
209715200 bytes transferred in 9.789672 secs (21422087 bytes/sec)
[root at testing2 /]# rm /tmp/file
[root at testing2 /]# ~^C
[root at testing2 /]# dd if=/dev/zero of=/file bs=50M count=4
4+0 records in
4+0 records out
209715200 bytes transferred in 6.826694 secs (30719877 bytes/sec)
[root at testing2 /]# rm /file
[root at testing2 /]# dd if=/dev/zero of=/file bs=50M count=4
4+0 records in
4+0 records out
209715200 bytes transferred in 6.955417 secs (30151348 bytes/sec)
[root at testing2 /]# rm /file
Thanks and regards,
Patrick Dung
More information about the freebsd-questions
mailing list