linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Tuning for Compact Flash
@ 2008-09-27 12:54 Christer Weinigel
  2008-09-28 15:28 ` jim owens
  0 siblings, 1 reply; 7+ messages in thread
From: Christer Weinigel @ 2008-09-27 12:54 UTC (permalink / raw)
  To: linux-fsdevel

Hi all,

I have a Thinkpad X40 that I'd like to replace the Hitachi hard drive 
on.  The drive is 1"8 with a normal 2"5 PATA disk connector on the side 
and such disks are not manufactured any more, so I went out and bought a 
Compact Flash adapter and a Transcend 133X 32 GByte Compact Flash.

I installed Fedora 9 on the Compact Flash, with a small boot partition 
and then one large encrypted LVM partition where I put the swap 
partition and an ext3 file system.  This turned out to be bog slow, 
write speed to the ext3 file system seem to be about 1MByte/s which is 
just horrible.  Since Transcend claims 45MByte/s read bandwidth and 
16MByte/s write bandwidth, this seems much too low.

So, I did some simple tests to see how the compact flash behaves.  To 
measure write speed i did the following for different block sizes:

     dd oflag=direct if=/dev/zero of=/dev/sdd1 bs=$bs

and to measure read speed I did the following:

     dd iflag=direct if=/dev/sdd1 of=/dev/null bs=$bs

The results are:

                 Transcend Flash         Hitachi Hard Drive
Block Size      Write   Read            Write   Read
4k              2.2     14.4            14.2    20.1
16k             10.8    23.2            15.7    20.5
32k             15.6    31.2            15.7    20.5
64k             17.2    37.1            15.7    20.5
128k            17.8    44.5            15.8    20.5
1M              18.0    45.8            18.0    20.5
16M             17.8    46.0            20.5    20.5

It seems that Transcend were actually a bit conservative, the max read 
and write speeds actually exceed their claims, but as transfer size goes 
down, performance suffers.  (I ought to perform another test with 
non-transfer-size aligned transfers to see if that makes a difference, 
that could tell me some more about how the flash behaves internally.)

So, is there any file system for Linux that would perform better than 
ext3 on a device like this?  I need a file system with Posix semantics 
so that I can use it as my root file system, and it would be nice with a 
file system with some kind of journalling so that if the laptop powers 
off unexpectedly I don't have to run fsck.  Or is there any tuning of 
kernel parameters I can do to make ext3 + lvm + crypto run faster?

Has anyone looked at writing a file system especially targeted for this 
kind of flash devices?  The same issues I have with this compact flash 
ought to show up with other flash devices such as USB drives (some web 
page mentioned that the Transcend flash uses a Silicon Motion flash 
controller; another Silicon Motion flash controller is used in a lot of 
USB drivers so probably behaves similarly).

For the moment, I've put back the Hitachi hard drive in my laptop, but 
it is starting to become a bit noisy, so I'm afraid that it will fail 
soon and I'll have to switch to the flash drive despite its performance 
problems.  But for now I can play around with the flash drive and try 
different things on it.

   /Christer

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-10-02 16:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-27 12:54 Tuning for Compact Flash Christer Weinigel
2008-09-28 15:28 ` jim owens
2008-09-29  6:54   ` Artem Bityutskiy
2008-09-29 12:23   ` Christer Weinigel
2008-09-29 15:17     ` Martin K. Petersen
2008-09-29 23:11       ` Christer Weinigel
2008-10-02 16:40         ` Chuck Lever

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).