On Wed, Jun 22, 2005 at 02:41:39AM +0200, Eli Billauer wrote:

> And finally: Does an RAM FIFO help? Surprisingly, the answer is no. I 
> did the following:
> 
> mknod mypipe p
> mbuffer -i mypipe -o /fatfs/output-file &
> ./writefat mypipe > listfile

Until 2.6.mumble, pipes only used a single page in memory. Since
2.6.mumble we're using up to 16 pages and flipping between consumer
and producer, which should give much better pipe utilization for large
writes.

> Insights, anybody?

Yeah, how about you cut out the various middlemen from the code? at
least it's not in Java... 

- use write, not fwrite!!!
- use DIRECT_IO to bypass kernel caching
- use the appropriate IO elevator
- verify that your disk drivers are tuned for whatever you want to do
(is DMA on?)
- what else is the system doing? is it idle? busy? is anything else
interfering with the scheduling of your program?

Linux is a general purpose OS, which means it's good for a lot of
things and optimal for none. If you want it to be optimal for your
specific usage, you should spend some time optimizing and tuning it
for it. And that's true regardless of what your usage happens to be.

Cheers,
Muli
-- 
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/


--------------------------------------------------------------------------
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]


Reply via email to