* using direct IO with sgp_dd
@ 2008-03-11 7:40 Doron Shoham
2008-03-11 8:50 ` Bart Van Assche
0 siblings, 1 reply; 4+ messages in thread
From: Doron Shoham @ 2008-03-11 7:40 UTC (permalink / raw)
To: linux-scsi
Hi,
I wanted to use direct IO with sgp_dd.
I have done:
echo 1 > /proc/scsi/sg/allow_dio
sgp_dd if=/dev/sg1 of=/dev/null bs=512 bpt=128 thr=8 time=1 count=5M dio=1
time to transfer data was 2.236290 secs, 1200.36 MB/sec
5242880+0 records in
5242880+0 records out
Direct IO requested but incomplete 40960 times
What does it mean "Direct IO requested but incomplete 40960 times"?
And what could be the reason for this?
When using bpt smaller then 128 it doesn't happen.
Thanks,
Doron
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: using direct IO with sgp_dd
2008-03-11 7:40 using direct IO with sgp_dd Doron Shoham
@ 2008-03-11 8:50 ` Bart Van Assche
2008-03-11 9:12 ` Doron Shoham
0 siblings, 1 reply; 4+ messages in thread
From: Bart Van Assche @ 2008-03-11 8:50 UTC (permalink / raw)
To: Doron Shoham; +Cc: linux-scsi
On Tue, Mar 11, 2008 at 8:40 AM, Doron Shoham <dorons@voltaire.com> wrote:
> sgp_dd if=/dev/sg1 of=/dev/null bs=512 bpt=128 thr=8 time=1 count=5M dio=1
> time to transfer data was 2.236290 secs, 1200.36 MB/sec
> 5242880+0 records in
> 5242880+0 records out
> Direct IO requested but incomplete 40960 times
>
> What does it mean "Direct IO requested but incomplete 40960 times"?
> And what could be the reason for this?
The man page of sgp_dd states that the parameter specified to bs must
be the block size of the physical device. You can query the block size
of a SCSI device with e.g. the scsi_readcap command:
$ scsi_readcap /dev/sda
sg_readcap /dev/sda
Read Capacity results:
Last logical block address=625142447 (0x2542eaaf), Number of blocks=625142448
Logical block length=512 bytes
Hence:
Device size: 320072933376 bytes, 305245.3 MiB, 320.07 GB
Bart.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: using direct IO with sgp_dd
2008-03-11 8:50 ` Bart Van Assche
@ 2008-03-11 9:12 ` Doron Shoham
2008-03-12 22:46 ` Douglas Gilbert
0 siblings, 1 reply; 4+ messages in thread
From: Doron Shoham @ 2008-03-11 9:12 UTC (permalink / raw)
To: Bart Van Assche; +Cc: linux-scsi
Bart Van Assche wrote:
> On Tue, Mar 11, 2008 at 8:40 AM, Doron Shoham <dorons@voltaire.com> wrote:
>> sgp_dd if=/dev/sg1 of=/dev/null bs=512 bpt=128 thr=8 time=1 count=5M dio=1
>> time to transfer data was 2.236290 secs, 1200.36 MB/sec
>> 5242880+0 records in
>> 5242880+0 records out
>> Direct IO requested but incomplete 40960 times
>>
>> What does it mean "Direct IO requested but incomplete 40960 times"?
>> And what could be the reason for this?
>
> The man page of sgp_dd states that the parameter specified to bs must
> be the block size of the physical device. You can query the block size
> of a SCSI device with e.g. the scsi_readcap command:
>
> $ scsi_readcap /dev/sda
> sg_readcap /dev/sda
> Read Capacity results:
> Last logical block address=625142447 (0x2542eaaf), Number of blocks=625142448
> Logical block length=512 bytes
> Hence:
> Device size: 320072933376 bytes, 305245.3 MiB, 320.07 GB
>
> Bart.
Hi,
sg_readcap /dev/sdb
Read Capacity results:
Last block address=3221225471 (0xbfffffff), Number of blocks=3221225472
Block size=512 bytes
Hence:
Device size: 1649267441664 bytes, 1572864.0 MiB, 1649.27 GB
The block size is 512 as I used in the sgp_dd command.
The problem is just when using dio=1, without it it works ok.
Thanks,
Doron
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: using direct IO with sgp_dd
2008-03-11 9:12 ` Doron Shoham
@ 2008-03-12 22:46 ` Douglas Gilbert
0 siblings, 0 replies; 4+ messages in thread
From: Douglas Gilbert @ 2008-03-12 22:46 UTC (permalink / raw)
To: Doron Shoham; +Cc: Bart Van Assche, linux-scsi
Doron Shoham wrote:
> Bart Van Assche wrote:
>> On Tue, Mar 11, 2008 at 8:40 AM, Doron Shoham <dorons@voltaire.com> wrote:
>>> sgp_dd if=/dev/sg1 of=/dev/null bs=512 bpt=128 thr=8 time=1 count=5M dio=1
>>> time to transfer data was 2.236290 secs, 1200.36 MB/sec
>>> 5242880+0 records in
>>> 5242880+0 records out
>>> Direct IO requested but incomplete 40960 times
>>>
>>> What does it mean "Direct IO requested but incomplete 40960 times"?
>>> And what could be the reason for this?
>> The man page of sgp_dd states that the parameter specified to bs must
>> be the block size of the physical device. You can query the block size
>> of a SCSI device with e.g. the scsi_readcap command:
>>
>> $ scsi_readcap /dev/sda
>> sg_readcap /dev/sda
>> Read Capacity results:
>> Last logical block address=625142447 (0x2542eaaf), Number of blocks=625142448
>> Logical block length=512 bytes
>> Hence:
>> Device size: 320072933376 bytes, 305245.3 MiB, 320.07 GB
>>
>> Bart.
>
> Hi,
> sg_readcap /dev/sdb
>
> Read Capacity results:
> Last block address=3221225471 (0xbfffffff), Number of blocks=3221225472
> Block size=512 bytes
> Hence:
> Device size: 1649267441664 bytes, 1572864.0 MiB, 1649.27 GB
>
> The block size is 512 as I used in the sgp_dd command.
> The problem is just when using dio=1, without it it works ok.
Doron,
Try reducing the bpt value (say to 64 or 32). To see more of
what might be the problem add 'verbose=<n>' to the command
line (and reduce the count to stop being flooded with
debug messages).
Doug Gilbert
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-03-12 22:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-11 7:40 using direct IO with sgp_dd Doron Shoham
2008-03-11 8:50 ` Bart Van Assche
2008-03-11 9:12 ` Doron Shoham
2008-03-12 22:46 ` Douglas Gilbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).