Re: Disk performance
Re: Disk performance
- Subject: Re: Disk performance
- From: Anton Altaparmakov <email@hidden>
- Date: Fri, 2 Nov 2007 08:21:15 +0000
On 2 Nov 2007, at 05:55, Sam Vaughan wrote:
This isn't really a filesystems question, but I thought you guys
would be good people to ask. I'm about to set up a software RAID of
four WD10EACS 1TB disks in a Mac Pro and I want a small four-way
RAID 0 volume for high throughput work as well as a large RAID 10
volume for media storage.
I'd assumed that the best place to put the partitions that will
become the RAID 0 volume would be in the cylinders at the edge of
the disk, where there are more bits per track and therefore more
bits passing under the heads in any given time period. I ran a test
to check it out:
$ sudo diskutil partitionDisk disk0 GPTFormat \
> JHFS+ a0 10% \
> JHFS+ a1 10% \
> JHFS+ a2 10% \
> JHFS+ a3 10% \
> JHFS+ a4 10% \
> JHFS+ a5 10% \
> JHFS+ a6 10% \
> JHFS+ a7 10% \
> JHFS+ a8 10% \
> JHFS+ a9 10% > /dev/null
$ diskutil list disk0
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *931.5 Gi disk0
1: EFI 200.0 Mi disk0s1
2: Apple_HFS a0 93.0 Gi disk0s2
3: Apple_HFS a1 93.0 Gi disk0s3
4: Apple_HFS a2 93.0 Gi disk0s4
5: Apple_HFS a3 93.0 Gi disk0s5
6: Apple_HFS a4 93.0 Gi disk0s6
7: Apple_HFS a5 93.0 Gi disk0s7
8: Apple_HFS a6 93.0 Gi disk0s8
9: Apple_HFS a7 93.0 Gi disk0s9
10: Apple_HFS a8 93.0 Gi disk0s10
11: Apple_HFS a9 92.8 Gi disk0s11
$ for i in `jot 10 2`; do
> P=/dev/rdisk0s$i
> echo -n "$P: "
> sudo dd if=$P of=/dev/null bs=1m count=1k 2>&1 | \
> perl -ne 'if (/\((\d+)/) {printf "%.1fMB/s\n", $1 / (1 << 20);}'
> done
/dev/rdisk0s2: 82.5MB/s
/dev/rdisk0s3: 84.5MB/s
/dev/rdisk0s4: 81.1MB/s
/dev/rdisk0s5: 78.6MB/s
/dev/rdisk0s6: 76.0MB/s
/dev/rdisk0s7: 72.7MB/s
/dev/rdisk0s8: 68.3MB/s
/dev/rdisk0s9: 64.1MB/s
/dev/rdisk0s10: 57.8MB/s
/dev/rdisk0s11: 51.6MB/s
$
I've got my answer for where to put the RAID 0 partitions, but I'm
curious. Is the disk addressing the cylinders from the perimeter in
to the spindle, or have I got the wrong idea about where the fastest
part of the disk is?
Also, I don't understand why seeking into one large partition with
dd(1) doesn't produce the same results:
$ sudo diskutil partitionDisk disk0 GPTFormat JHFS+ b0 100% > /
dev/null
$ diskutil list disk0
/dev/disk0
#: TYPE NAME
SIZE IDENTIFIER
0: GUID_partition_scheme *931.5
Gi disk0
1: EFI 200.0
Mi disk0s1
2: Apple_HFS b0 931.2
Gi disk0s2
$ for i in `jot 10 0 900`; do
> echo -n offset "${i}GB: "
> sudo dd if=/dev/rdisk0s2 of=/dev/null bs=1m count=1k seek=${i}g
2>&1 | \
> perl -ne 'if (/\((\d+)/) {printf "%.1fMB/s\n", $1 / (1 << 20);}'
> done
offset 0GB: 85.5MB/s
offset 100GB: 85.6MB/s
offset 200GB: 85.5MB/s
offset 300GB: 85.5MB/s
offset 400GB: 85.5MB/s
offset 500GB: 85.5MB/s
offset 600GB: 85.5MB/s
offset 700GB: 85.5MB/s
offset 800GB: 85.5MB/s
offset 900GB: 85.4MB/s
$
I find these results a bit hard to believe. Perhaps I've
misinterpreted the dd(1) man page? It shouldn't be that hard, but
then again it is Friday afternoon...
Yes you did. You want "skip=" not "seek=". Using seek will seek
inside /dev/null not inside /dev/rdisk0s2 thus all your reads are from
the same place. Try it again with skip instead of seek and you should
find the same results as the other test with individual partitions.
Best regards,
Anton
Anyway, it's all just curiosity food really, but I'd be interested
to hear from anyone who can shed some light.
Thanks,
Sam
P.S:
$ uname -r
9.0.0
$ sysctl hw.memsize
hw.memsize: 5368709120
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer, http://www.linux-ntfs.org/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden