[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linaro-flashbench-results
Subject:    [Flashbench] Fwd: Kingston 8GB Datatraveler DT101 G2
From:       ajax.criterion () gmail ! com (Ajax Criterion)
Date:       2011-07-29 16:22:18
Message-ID: CACx56aXg5H=Wbi8c58juGyfGBRkx4c6qbHyJxX8V2j4bOFRAvw () mail ! gmail ! com
[Download RAW message or body]

On Thu, Jul 28, 2011 at 7:51 AM, Arnd Bergmann <arnd at arndb.de> wrote:
> On Thursday 28 July 2011, Ajax Criterion wrote:
>
>> What's my page size here -- 16KB or 32? ?i'm thinking 16, because
>> there are times when 16KB was running at greater than half the speed
>> of 32KB, but I'm not positive on this...
>
> Yes exactly. Given results like
>
> 64KiB ? 15.1M/s
> 32KiB ? 10.8M/s
> 16KiB ? 6.58M/s
> 8KiB ? ?2.82M/s
> 4KiB ? ?1.44M/s
> 2KiB ? ?744K/s
>
> my interpretation is that the page size is 16 KB. It may not actually
> be the page size, but it's what I wrote in the wiki for other drives
> that behave just like this one.
>
> There is another twist that I only found late in the process of compiling
> the list in the wiki: Usually the drives have multiple channels, so what
> I list as the page size is actually the page size multiplied by the
> number of channels. A likely scenario would be a 4KB page with 4 channels.
> In this case, writing 16KB at a 4KB alignment should be just as fast as
> writing 16KB at a 16 KB alignment. In practice, this doesn't matter all
> that much because writing longer is always going to help, what I call
> the page size in the wiki is simply the smallest amount that you need to
> write to be reasonably efficient.
>
> ? ? ? ?Arnd
>


I ran some tests on my Kingston drive to see how much having the drive
in vs. out of alignment affects performance.  I haven't graphed all of
my results, and I have to run test again (I run each test three times
and check the standard deviations-- one of the tests came back
atypically slow).

I tested write, read, and overwrite speeds for large files (a 300MB
iso file) and many small files (extracting and moving the kernel
sources tarball), with an EXT4 partition aligned with 4MB eraseblocks,
then shifted it off by 1MB to replicate starting a partition on sector
2048 (this seems to be fairly common, and represents an alignment that
matches page sizes but not eraseblocks), and then shifted it to a 4MB
+63 sectors position to replicate what happens when these drives get
repartitioned in linux and given 255/63 geometry (this represents
starting a sector out of alignment with both eraseblocks and page
sizes).

What I noticed is about a 3%-5% drop in write speed between a 4MB and
1MB alignment, and a 15-25% drop in write speeds between a 4MB and
63-sector alignments.  Reading speeds were not as affected (as one
would suspect), but still lost between 5% and 15% with the alignment
off by 63 sectors.

I suspect these affects would be even more noticeable on a drive that
could not handle as many open AU's.  Also, there is the unseen problem
of wear -- while the noticeable speeds may only go down by 20%, if I
understand the process correctly, having an unaligned partition
(especially one that is not aligned to the page size) could wear out
the drive twice as quickly (or even faster).  This may be of little
consequence to those who only write to their drives occassionally, but
to heavy users, this information will be of great importance.

I'm going to be replicating this same test with a FAT32 fileysystem,
as this is what most drives are formatted with out of the box, and
many Porteus users run the OS off of a FAT32 stick.  I'll be checking
the same (mis)alignments, and then running it in an aligned partition
with a cluster size that matches the effective page size.  I'm also
going to put this drive back to a 255 heads/63 sectors per track
configuration and test it again, just to confirm that this has little
to no effect (just changing the starting point of the partitions would
probably be easier for most users than playing with the drive's
geometry).

I do have some question out of all this -- how would a FAT32 user
align their partition to an eraseblock and make use of a fat-optimized
eraseblock at the beginning of the drive?  In the case of my kingston
drive, for example, the first 4MB is optimized for the FAT, but
properly aligning the drive would mean placing my first partition
after this eraseblock (since sector 0 is needed for the MBR).  Would
they typically set the start of the partition at sector 2048 and call
that 'good enough', leaving 3MB at the front of the drive for the FAT?
 Is the optimization in that eraseblock useful enough to warrant
misaligning the drive?

As always, thanks for your time and your help!


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic