[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[dm-devel] Size affects performance?



Hi,

I've noticed that the size of a device seems to affect its performance.
Is this expected behaviour?

For example, on a device that is exactly 1GB, I can transfer at 16.4 MB/s:

flanders1:~# dmsetup create test
0 2097152 linear /dev/sda6 0

flanders1:~# dd if=/dev/zero of=/dev/mapper/test bs=1K count=1048576
1048576+0 records in
1048576+0 records out
1073741824 bytes (1.1 GB) copied, 65.4846 seconds, 16.4 MB/s


Yet, if I resize the device to be one sector larger, the same transfer happens at 59.0 MB/s:

flanders1:~# dmsetup create test
0 2097153 linear /dev/sda6 0

flanders1:~# dd if=/dev/zero of=/dev/mapper/test bs=1K count=1048576
1048576+0 records in
1048576+0 records out
1073741824 bytes (1.1 GB) copied, 18.1887 seconds, 59.0 MB/s


For reference, the underlying device seems capable of ~ 60 MB/s:

flanders1:~# dd if=/dev/zero of=/dev/sda6 bs=1K count=1048576
1048576+0 records in
1048576+0 records out
1073741824 bytes (1.1 GB) copied, 18.1325 seconds, 59.2 MB/s


I've noticed that the problem either doesn't occur or isn't as pronounced if different block sizes are used (ie. bs=4K).
I'm running a fairly recent kernel: git tag v2.6.23-rc1-g6a30235


Thanks for any help,


Andrew Miklas


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]