koct9i / ioping

simple disk I/0 latency measuring tool
GNU General Public License v3.0
947 stars 76 forks source link

-s option is not working properly on running io on RAW LUNS. #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. ioping -c 10 -s 16K /dev/mapper/mpath256
What is the expected output? What do you see instead?

we expected io should happen for 16k on the device (RAW LUN)

Actual Result:

IO's are written on RAW LUNs are 4kb block size.

What version of the product are you using? On what operating system?
[root@DC2-RHEL58-MPIO ~]# ioping -v
ioping 0.6
[root@DC2-RHEL58-MPIO ~]#

OS system: RHEL 5.8

Please provide any additional information below.

Original issue reported on code.google.com by prathap...@gmail.com on 4 Jan 2013 at 5:24

GoogleCodeExporter commented 9 years ago
Where did you see requests sizes?

Probably you block device cannot handle such requests.
please check:
/sys/block/$DEV/queue/max_sectors_kb
/sys/block/$DEV/queue/max_hw_sectors_kb

If linux block-layer wants to split request it just do it.
Actually there is no guarantees for requests bigger than sector.

Original comment by koct9i on 2 Feb 2013 at 4:55

GoogleCodeExporter commented 9 years ago
Please find the steps followed for generating IO on RAW LUN using ioping.

[root@DC2-RHEL58-MPIO ~]# cat /sys/block/sdl/queue/max_hw_sectors_kb
120
[root@DC2-RHEL58-MPIO ~]# cat /sys/block/sdl/queue/max_sectors_kb
120
[root@DC2-RHEL58-MPIO ~]# Before IO diskstats values of /d
ev/sdl

[root@DC2-RHEL58-MPIO ~]# cat /proc/diskstats |grep -w sdl
   8  176 sdl 44 77 968 11 0 0 0 0 0 10 11

[root@DC2-RHEL58-MPIO ~]# ioping -c 10 -s 16k /dev/sdl
16384 bytes from /dev/sdl (device 5.0 Gb): request=1 time=0.6 ms
16384 bytes from /dev/sdl (device 5.0 Gb): request=2 time=1.3 ms
16384 bytes from /dev/sdl (device 5.0 Gb): request=3 time=0.6 ms
16384 bytes from /dev/sdl (device 5.0 Gb): request=4 time=0.6 ms
16384 bytes from /dev/sdl (device 5.0 Gb): request=5 time=0.7 ms
16384 bytes from /dev/sdl (device 5.0 Gb): request=6 time=0.6 ms
16384 bytes from /dev/sdl (device 5.0 Gb): request=7 time=0.5 ms
16384 bytes from /dev/sdl (device 5.0 Gb): request=8 time=1.0 ms
16384 bytes from /dev/sdl (device 5.0 Gb): request=9 time=0.7 ms
16384 bytes from /dev/sdl (device 5.0 Gb): request=10 time=0.6 ms

--- /dev/sdl (device 5.0 Gb) ioping statistics ---
10 requests completed in 9011.7 ms, 1400 iops, 21.9 mb/s
min/avg/max/mdev = 0.5/0.7/1.3/0.2 ms
[root@DC2-RHEL58-MPIO ~]# 

[root@DC2-RHEL58-MPIO ~]#After IO
[root@DC2-RHEL58-MPIO ~]# cat /proc/diskstats |grep -w sdl
   8  176 sdl 84 77 1288 13 0 0 0 0 0 12 13
[root@DC2-RHEL58-MPIO ~]# 

As per diskstat values IO size is = 4KB. 

my script o/p for calc IO's and Latency from diskstats.

[root@DC2-RHEL58-MPIO ~]# ./a.out
Device Name = sdl
 Read Count  = 44
 Read Sector = 968
 Read Time   = 11000
 Write Count = 0
 Write Sector= 0
 Write Time  = 0

Device Name = sdl
 Read Count  = 84
 Read Sector = 1288
 Read Time   = 13000
 Write Count = 0
 Write Sector= 0
 Write Time  = 0

 Total MB Transfered = 320
 IOCount = 40
 Latency = 50 Micro Seconds
 IOSize = 8
[root@DC2-RHEL58-MPIO ~]#

Original comment by prathap...@gmail.com on 4 Feb 2013 at 4:52

GoogleCodeExporter commented 9 years ago

Original comment by koct9i on 28 Feb 2013 at 7:53

GoogleCodeExporter commented 9 years ago
Seems like this ancient kernel cannot merge cached read requests into one.
Try direct-io or use newer kernel.

Original comment by koct9i on 3 Mar 2013 at 6:50

GoogleCodeExporter commented 9 years ago
Thanks a lot. 

By using direct-io(-D) option able to generate IO's on specific block size.

Original comment by prathap...@gmail.com on 4 Mar 2013 at 7:37

GoogleCodeExporter commented 9 years ago

Original comment by koct9i on 9 Jul 2013 at 11:05