Re: [Hampshire] FAT32 problems

Top Page

Reply to this message
Author: Stephen Pelc
Date:  
To: hampshire
Subject: Re: [Hampshire] FAT32 problems
> I have written a data logging programme which stores data on an 8GB USB
> drive and has worked without problem for some time until disk access to
> the drive became more and more sluggish (files were deleted and so the
> number at any time was no bigger that 100). The hardware is a National
> Instruments cRio, VxWorks OS.


> The only possible problem that I discovered is a warning in
> documentation is that the file system is FAT and filenames should be
> limited to the 8.3 format. I wasn't aware of that and used filenames 14
> characters long.
>
> The problem only shows itself when using FTP to list files. It seems
> that data transfer is OK from the USB drive. It looks as if the system
> drive is OK for all FTP operations.


The FTP listing problem suggests that you have a sector read
issue. If you have residual long file names, you have fewer
directory entries per sector.

If the directory file is badly fragmented, you will be putting
pressure on the FAT buffering mechanism. In practice, you
usually need to buffer at least six 512-byte sectors to avoid
thrashing.

Try converting all file names to 8.3 format and then defrag the
drive. You find it more convenient to copy everthing off the
drive, reformat the drive, and copy everything back. This
process should repack the directories. Increasing the cluster
size can also improve directory listing performance for reasons
I do not fully understand, but it appears to be linked to the
host O/S buffering.

Stephen
--
Stephen Pelc, stephen@???
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691
web: http://www.mpeforth.com - free VFX Forth downloads


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.