[Coco] CoCoSDC performance issue - can someone try this from OS-9?

Darren A mechacoco at gmail.com
Sun Feb 1 12:01:29 EST 2015


On Sun, Feb 1, 2015 at 1:29 AM, Nick Marentes wrote:

>
> You realize that defrag does little speed-wise on any memory based drive?
> There is no head seek on these, they just access the next block instantly
> just like normal memory.
>
>

One problem on the CoCo SDC is going to be the time it takes to traverse
the DSK file's cluster chain when seeking to logical sectors within a large
image.  With the limited RAM in the mircro controller, only one sector (512
bytes) of the card's FAT is cached at any time. That means on a FAT16
volume, a maximum of 256 cluster locaions can be cached, and only 128 on a
FAT32 volume. If the cluster size is 4K then a 128 MB DSK image requires
32768 clusters which, if contiguous, means that 64 sectors of the FAT may
have to be read to traverse the entire chain.

I've been thinkg of ways to improve the performance with large files. The
most obvious would be to examine the cluster chain when the DSK file is
mounted and determine if it is contiguous or fragmented. If contiguous,
there would not be any need to traverse the cluster chain when seeking
within the file. In this case, defragging the SD card could be a huge
improvement.

- Darren


More information about the Coco mailing list