Dosfsys read performance

Dosfsys read performance

Post by Ton C. Jaspe » Tue, 22 Oct 1996 04:00:00



Hi,

We are using a removable SCSI disk for data exchange with a host.
The SCSI disk is FAT-formatted and accessed through Dosfsys.

A test program that opens, reads and closes a file many times using
fgets() runs for several seconds when the file is located on the
SCSI-FAT disk but runs for only a fraction of a second when
the file is located on the IDE-QNX formaated internal disk.

My questions:
1. Why is this (my guess is Dosfsys does not support disk caching)?
2. Is there a read-cache option available for Dosfsys ?
3. Are there other ways to improve read-performance with Dosfsys
   other than copying files from the SCSI-FAT disk to the IDE-QNX
   disk. (The files on the SCSI-FAT disk are several hundreds of
   MB's large).


 
 
 

Dosfsys read performance

Post by Grant Courvil » Wed, 23 Oct 1996 04:00:00



Quote:> Hi,
> We are using a removable SCSI disk for data exchange with a host.
> The SCSI disk is FAT-formatted and accessed through Dosfsys.
> A test program that opens, reads and closes a file many times using
> fgets() runs for several seconds when the file is located on the
> SCSI-FAT disk but runs for only a fraction of a second when
> the file is located on the IDE-QNX formaated internal disk.

Is your SCSI "disk" removeable ?
I ask this as Dosfsys invalidates its internal cache every 2 seconds
for removeable devices (i.e. floppies, cd-roms, etc). This is done
so that correct data is read in the event you change media.

Quote:> My questions:
> 1. Why is this (my guess is Dosfsys does not support disk caching)?

See above.

Quote:> 2. Is there a read-cache option available for Dosfsys ?

There is a new "cache timeout" option available to Dosfsys but it
did not make the 4.23 release. It will be available in the next
release. You could use this option to extend the timeout period from
the default 2 seconds.

Quote:> 3. Are there other ways to improve read-performance with Dosfsys
>    other than copying files from the SCSI-FAT disk to the IDE-QNX
>    disk. (The files on the SCSI-FAT disk are several hundreds of
>    MB's large).

Please try scsi_util and see if it is of type removeable.
        scsi_util /dev/hd0 info
--

QNX Software Systems, Ltd.         QUICS: grant  (613) 591-0934 (data)
(613) 591-0931 x242 (voice)        mail:  175 Terence Matthews          
(613) 591-3579      (fax)                 Kanata, Ontario, Canada K2M 1W8

 
 
 

Dosfsys read performance

Post by Mitchell Schoenbr » Wed, 23 Oct 1996 04:00:00


: Is your SCSI "disk" removeable ?
: I ask this as Dosfsys invalidates its internal cache every 2 seconds
: for removeable devices (i.e. floppies, cd-roms, etc). This is done
: so that correct data is read in the event you change media.

If that is the case, then 4.23 brings new hope.  If a driver locks
the media and properly informs Fsys, then the invalidation will not
take place until the media is unlocked.
--


 
 
 

Dosfsys read performance

Post by Bill Flowe » Wed, 23 Oct 1996 04:00:00




>: Is your SCSI "disk" removeable ?
>: I ask this as Dosfsys invalidates its internal cache every 2 seconds
>: for removeable devices (i.e. floppies, cd-roms, etc). This is done
>: so that correct data is read in the event you change media.

>If that is the case, then 4.23 brings new hope.  If a driver locks
>the media and properly informs Fsys, then the invalidation will not
>take place until the media is unlocked.

Different cache; Fsys might not invalidate its cache (if removable media
is locked), but Dosfsys doesn't know about those details and will still
be timing out its cached information.
--

phone: +1 (613) 591-0931 (voice)            175 Terence Matthews Cr.
       +1 (613) 591-3579 (fax)              Kanata, Ontario, Canada K2M 1W8
 
 
 

Dosfsys read performance

Post by Martin Zimmerm » Thu, 24 Oct 1996 04:00:00



Quote:> 1. Why is this (my guess is Dosfsys does not support disk caching)?

Proc actually handles the "name space resolution" when you access a file
or device.  In the case of /dos/c (or others adopted by Dosfsys) the
requests go directly to Dosfsys which then talks to the raw device.
Since Fsys is not involed on a file level, it provides no caching, and I
do not believe that Dosfsys has any caching capabilities at all.

Quote:> 2. Is there a read-cache option available for Dosfsys ?

There is no provision (that I am aware of) in Dosfsys for any type of
caching.  The Fsys.* drivers might perform some track/sector level
caching, but nothing as effective as the cache mechanism in Fsys itself.

Quote:> 3. Are there other ways to improve read-performance with Dosfsys
>    other than copying files from the SCSI-FAT disk to the IDE-QNX
>    disk. (The files on the SCSI-FAT disk are several hundreds of
>    MB's large).

It depends on which system you access them from the most.  If you access
them from DOS the most, then leave them where they are and just live
with the access times on QNX.  If you access them most from QNX, then
I'd suggest putting them on a QNX filesystem and exporting them to
Win95/WinNT via Samba.

Cheers,
Camz.
--
Martin Zimmerman - Camz Software Enterprises - QNX Programming & Consulting
   WWW: http://www.cuug.ab.ca:8001/~zimmerm/


 
 
 

Dosfsys read performance

Post by Bill Flowe » Thu, 24 Oct 1996 04:00:00





>> 1. Why is this (my guess is Dosfsys does not support disk caching)?

>Proc actually handles the "name space resolution" when you access a file
>or device.  In the case of /dos/c (or others adopted by Dosfsys) the
>requests go directly to Dosfsys which then talks to the raw device.
>Since Fsys is not involed on a file level, it provides no caching, and I
>do not believe that Dosfsys has any caching capabilities at all.

Sorry Martin, but Dosfsys reads and writes the block-special file.
To do this it communicates with Fsys which does cache the requests.
Also Fsys applies its standard algorithms to try to predict I/O
patterns used to calculate when and how much to readahead.  Doing
this at the block level isn't as efficient as Fsys does for QNX files
but it does help.

Quote:>> 2. Is there a read-cache option available for Dosfsys ?

>There is no provision (that I am aware of) in Dosfsys for any type of
>caching.  The Fsys.* drivers might perform some track/sector level
>caching, but nothing as effective as the cache mechanism in Fsys itself.

Dosfsys does cache some information so it doesn't have to repeatedly
go back to Fsys for the blocks.

Quote:>> 3. Are there other ways to improve read-performance with Dosfsys
>>    other than copying files from the SCSI-FAT disk to the IDE-QNX
>>    disk. (The files on the SCSI-FAT disk are several hundreds of
>>    MB's large).

>It depends on which system you access them from the most.  If you access
>them from DOS the most, then leave them where they are and just live
>with the access times on QNX.  If you access them most from QNX, then
>I'd suggest putting them on a QNX filesystem and exporting them to
>Win95/WinNT via Samba.

I'd suggest you put the files on a non-removable hard disk DOS
partition to get the best performance.  As Grant (the author of
Dosfsys) mentioned, Dosfsys takes a pessimistic view of cached
information if the files are on REMOVABLE media.
--

phone: +1 (613) 591-0931 (voice)            175 Terence Matthews Cr.
       +1 (613) 591-3579 (fax)              Kanata, Ontario, Canada K2M 1W8
 
 
 

Dosfsys read performance

Post by Ton C. Jaspe » Fri, 25 Oct 1996 04:00:00




>> Hi,
>> We are using a removable SCSI disk for data exchange with a host.
>> The SCSI disk is FAT-formatted and accessed through Dosfsys.
>> A test program that opens, reads and closes a file many times using
>> fgets() runs for several seconds when the file is located on the
>> SCSI-FAT disk but runs for only a fraction of a second when
>> the file is located on the IDE-QNX formaated internal disk.
>Is your SCSI "disk" removeable ?
>I ask this as Dosfsys invalidates its internal cache every 2 seconds
>for removeable devices (i.e. floppies, cd-roms, etc). This is done
>so that correct data is read in the event you change media.

It is not really removeable, it is a system in common use by our
customer. We had to adapt or lose the deal.
It is actually a normal SCSI disk mounted in a removeable draw.
A key-switch prevents accidental removal and switches the power
supply. I didn't like the solution but I agreed under the condition
the sytem is always rebooted after a disk change.

Quote:>Please try scsi_util and see if it is of type removeable.
>    scsi_util /dev/hd0 info

See above


 
 
 

Dosfsys read performance

Post by Martin Zimmerm » Fri, 25 Oct 1996 04:00:00



> Sorry Martin, but Dosfsys reads and writes the block-special file.
> To do this it communicates with Fsys which does cache the requests.

I wasn't sure if Fsys did much caching for non-file disk access.  Thank
you for clarifying exactly what types of caching are involved.

Quote:> Dosfsys does cache some information so it doesn't have to repeatedly
> go back to Fsys for the blocks.

I thought it might attempt to cache some of the meta-data, the FAT
filesystem is quite inefficient, especially for large numbers of small
files (easily shown by running the hardware detection in Win95).

Cheers,
Camz.
--
Martin Zimmerman - Camz Software Enterprises - QNX Programming & Consulting
   WWW: http://www.cuug.ab.ca:8001/~zimmerm/