From: Christer Weinigel <christer.weinigel@csr.com>
To: linux-fsdevel@vger.kernel.org
Subject: Tuning for Compact Flash
Date: Sat, 27 Sep 2008 14:54:56 +0200 [thread overview]
Message-ID: <48DE2D20.1090703@csr.com> (raw)
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
next reply other threads:[~2008-09-27 12:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-27 12:54 Christer Weinigel [this message]
2008-09-28 15:28 ` Tuning for Compact Flash 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48DE2D20.1090703@csr.com \
--to=christer.weinigel@csr.com \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).