My guess is that it has something to do with the filesystem stuff needing to
be written and flushed to the storage media in a synchronous fashion. I
think they do careful updating of all of the directory and bitmap data which
may involve a couple of writes followed by the writing of the actual data.
None of that directory/bitmap stuff goes on when you hit the raw device
directly. Given that the writes are the slow part, if there were two more
writes involved in the filesystem overhead that would give you your 3X
performance hit. Without actually getting in there and mucking around with
it myself, I’d say your best bets are to fiddle with the synchronous and/or
caching options for the filesystem (perhaps not IDE specific ya know?), or
go with the readblock()/writeblock() functions. Personally I’d go with the
block stuff as it doesn’t sound like you need anything more than a
sequentially growing quantity of log data, and that will be not only your
fastest option but probably your most recoverable in the event of a
Sounds like a cool application.
-Warren “Can I get a ride?” Peece
“Jason Farque” <firstname.lastname@example.org> wrote in message
Warren, thanks for the response.
My data application is for a battery powered device that travels along
inside of oil and gas pipelines at speeds up to 13 feet per second.
a 90’ bend inside of a pipeline at 9 miles per hour isn’t good for
media. Heck it’s not even good for solid state media, but it’s the
environment I’m in. I’m aware of the performance issues of Flash itself,
but what I can’t understand is why writing data through the devc-eide
is ~3 times slower than writing raw blocks to /dev/hd1. Is the devc-eide
driver that slow?
I have tuned the driver to use dma, and have tried other various
configurations of the driver but none of them seem to have a noticible
effect on performance. I thought this was purely a Flash write-time issue
until I experimented with writing to the raw /dev/hd1. Much to my
I can sustain ~350k-400/sec to the raw Flash device, but only ~140k
the devc-eide device driver in RTP 6.1.
“Warren Peece” <> Warren@NoSpam.com> > wrote in message
news:a4jgds$d5d$> email@example.com> …
First off FLASH speeds are FLASH speeds, it takes (comparatively) a long
time to write anything to a FLASH device regardless of filesystem
It’s the internal write algorithm that takes all the time. Also FLASH
devices have a limited life cycle (number of erases & writes) before
start developing bad spots, so FLASH is just a bad idea in general for
logging any substantial amount of data. As for IDE performance, IDE is
inherrantly more CPU intensive than say bus mastering SCSI so CPU speed
going to play a fairly large factor in overall performance. Knowing
make sure your IDE controller chipset as well as your IDE drive of
both have DMA capability and that you have that option enabled within
driver. Once you get that sorted out, you need to address how you write
your data to disk. I’m making a few assumptions here, namely that
writing your own application. Writing non-block sized data to any file
going to be slower than writing block sized data. As an example say
writing data to a file and the end of the data occupies the first 256
of a 512 byte disk block. If that disk block isn’t in the filesystem
which it probably won’t be in a logging application, then it will need
read from the drive, modified, then written back out. You can see where
this would be slower than if you always wrote 512 byte blocks. So,
the data up to say 32K at a time, then slap it to disk in one write.
has the added benefit of reducing the overhead of the system calls. You
want to look at readblock() and writeblock() as well, as they are
block oriented and may even be slightly less overhead than the standard
read()/write() calls (?). There are of course other factors (disk cache
size, synchronous writes and so on), but hopefully you’ll find some of
above suggestions helpful.
-Warren “Log THIS!” Peece
“Jason Farque” <> firstname.lastname@example.org> > wrote in message
news:a4h5fl$l40$> email@example.com> …
I’ve been playing around with the RTP’s QNX file system on an embedded
system with a PCMCIA IDE interface solid state hard disk (capacity
The computer is a 133MHz AMD 520 x86-compatible machine (DIMM-PC from
JumpTec) with 32MB of RAM. I’ve found that I can only achieve about
second writing to the flash disk drive using devb-eide, but that if I
to the raw disk in /dev/hd1 (for instance with “time dd if=/dev/hd0
of=/dev/hd1 count=100000”) I get about 350k a second.
My system is going into a data logging application where I will be
accumulating data at rates as high as 200kb/sec. Is there any way to
squeeze better performace out of the QNX/RTP devb-eide file system or
write to the raw disk to get the transfer rate that I want? Is there