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

Re: [Nbd] NBD Super Size io operations



On Tue, Apr 02, 2013 at 09:15:36AM +0000, Rohan Sharma wrote:
> Yes its exactly the same thing. In fact I copied the small code from your post.
> 
> But do you have any idea what can I do to increase io size to more than 128K.
> 
> The default value is 127K and increasing it to 128 works but anything more than that has
> 
> no effect.

Have you enabled debug in the nbd driver to verify this?
Is there no functional change or you cannot see any performance improvment in your
environment?
How are you testing it, which nbd server are you using?

# cat /sys/block/nbd0/queue/max_sectors_kb 
128
# dmesg -C
# dd if=/dev/zero of=/dev/nbd0 bs=1M oflag=direct count=1 > /dev/null 2>&1
# dd of=/dev/null if=/dev/nbd0 bs=1M iflag=direct count=1 > /dev/null 2>&1
# dmesg | grep -w control
[ 8841.472404] nbd0: request ffff88023f367a70: sending control (write@...1314...,131072B)
[ 8841.472682] nbd0: request ffff88023f367be8: sending control (write@...1315...,131072B)
[ 8841.472927] nbd0: request ffff88023f367d60: sending control (write@...1316...,131072B)
[ 8841.473186] nbd0: request ffff88023f3678f8: sending control (write@...1317...,131072B)
[ 8841.473427] nbd0: request ffff88023f367780: sending control (write@...1318...,131072B)
[ 8841.473642] nbd0: request ffff88023f367608: sending control (write@...1319...,131072B)
[ 8841.473872] nbd0: request ffff88023f367490: sending control (write@...1320...,131072B)
[ 8841.474123] nbd0: request ffff88023f367318: sending control (write@...1321...,131072B)
[ 8845.992189] nbd0: request ffff8802200b7608: sending control (read@...1314...,131072B)
[ 8845.992250] nbd0: request ffff8802200b7490: sending control (read@...1315...,131072B)
[ 8845.992267] nbd0: request ffff8802200b7318: sending control (read@...1316...,131072B)
[ 8845.992277] nbd0: request ffff8802200b7780: sending control (read@...1317...,131072B)
[ 8845.992286] nbd0: request ffff8802200b71a0: sending control (read@...1318...,131072B)
[ 8845.992309] nbd0: request ffff8802200b7028: sending control (read@...1319...,131072B)
[ 8845.992343] nbd0: request ffff8802200b6eb0: sending control (read@...1320...,131072B)
[ 8845.992362] nbd0: request ffff8802200b6d38: sending control (read@...1321...,131072B)

# cat /sys/block/nbd0/queue/max_sectors_kb 
256
# dmesg -C
# dd if=/dev/zero of=/dev/nbd0 bs=1M oflag=direct count=1 > /dev/null 2>&1
# dd of=/dev/null if=/dev/nbd0 bs=1M iflag=direct count=1 > /dev/null 2>&1
# dmesg | grep -w control
[ 9040.302164] nbd0: request ffff8801e68b4eb0: sending control (write@...1314...,262144B)
[ 9040.302493] nbd0: request ffff8801e68b5028: sending control (write@...1316...,262144B)
[ 9040.303405] nbd0: request ffff8801e68b51a0: sending control (write@...1318...,262144B)
[ 9040.303955] nbd0: request ffff8801e68b5318: sending control (write@...1320...,262144B)
[ 9052.112508] nbd0: request ffff8801e68b5608: sending control (read@...1314...,262144B)
[ 9052.112568] nbd0: request ffff8801e68b5780: sending control (read@...1316...,262144B)
[ 9052.112585] nbd0: request ffff8801e68b58f8: sending control (read@...1318...,262144B)
[ 9052.112594] nbd0: request ffff8801e68b5a70: sending control (read@...1320...,262144B)

# cat /sys/block/nbd0/queue/max_sectors_kb 
512
# dmesg -C
# dd if=/dev/zero of=/dev/nbd0 bs=1M oflag=direct count=1 > /dev/null 2>&1
# dd of=/dev/null if=/dev/nbd0 bs=1M iflag=direct count=1 > /dev/null 2>&1
# dmesg | grep -w control
[ 9186.068946] nbd0: request ffff8801e68b51a0: sending control (write@...1314...,524288B)
[ 9186.069643] nbd0: request ffff8801e68b5028: sending control (write@...1318...,524288B)
[ 9187.988700] nbd0: request ffff8801e68b4eb0: sending control (read@...1314...,524288B)
[ 9187.988757] nbd0: request ffff8801e68b4d38: sending control (read@...1318...,524288B)


# cat /sys/block/nbd0/queue/max_sectors_kb 
1024
# dmesg -C
# dd if=/dev/zero of=/dev/nbd0 bs=1M oflag=direct count=1 > /dev/null 2>&1
# dd of=/dev/null if=/dev/nbd0 bs=1M iflag=direct count=1 > /dev/null 2>&1
# dmesg | grep -w control
[ 9237.429241] nbd0: request ffff88023f366468: sending control (write@...1314...,1048576B)
[ 9239.811809] nbd0: request ffff8801e68b42f0: sending control (read@...1314...,1048576B)

# cat /sys/block/nbd0/queue/max_sectors_kb 
2048
# dmesg -C
# dd if=/dev/zero of=/dev/nbd0 bs=4M oflag=direct count=1 > /dev/null 2>&1
# dd of=/dev/null if=/dev/nbd0 bs=4M iflag=direct count=1 > /dev/null 2>&1
# dmesg | grep -w control
[ 9849.445633] nbd0: request ffff88020e22a758: sending control (write@...1314...,524288B)
[ 9849.446624] nbd0: request ffff88020e22aa48: sending control (write@...1318...,2097152B)
                                                                             ^^^^^^^^
[ 9849.450056] nbd0: request ffff88020e22a8d0: sending control (write@...1322...,524288B)
[ 9849.450899] nbd0: request ffff88020e22a2f0: sending control (write@...1323...,1048576B)
[ 9852.728195] nbd0: request ffff8801e68b45e0: sending control (read@...1314...,524288B)
[ 9852.728260] nbd0: request ffff8801e68b5028: sending control (read@...1318...,524288B)
[ 9852.728277] nbd0: request ffff8801e68b4000: sending control (read@...1324...,524288B)
[ 9852.728286] nbd0: request ffff8801e68b4758: sending control (read@...1325...,2097152B)
                                                                             ^^^^^^^^
[ 9852.728295] nbd0: request ffff8801e68b4178: sending control (read@...1326...,524288B)

Note that setting this value very high does not mean that smaller-sized
requests cannot be sent over the wire...

-- 
Michal Belczyk Sr.



Reply to: