> Hi all. This is a bit peripheral to rtlinux, but hopefully someone here can
> help me out.
> 
> I have written a data acquistion application using an rtlinux module,
> and, while everything works well when I am not saving data to disk, during disk
> writes I get pauses in the display. This is, as far as I understand it, a
> result of disk write buffering, and I'm wondering if there is anything I can do
> about it. 

make shure your disk is in dma-mode (hdparm -d /dev/hd# to check , hdparm -d 1 
/dev/hd# to set) if its in pio mode then the box will crawl on heavy writes.

depends also on the data amount that you need to write - but you could consider 
writing compressed output if its a lot - compressed output can improve the overall 
performance a lot as the disk normaly is the bottle neck (unless you have a 
glowing 80MByte/s SCSI palte in there).

> 
> I've tried fflush-ing the file and using setvbuf to set the file to
> non-buffered mode, but neither of those had any effect on the pauses.  During
> the pauses the cpu usage goes up from about 50% to 100% (most of it dedicated
> to the system).
>

are you using reiserfs by any chance ?? reiserfs likes to eat up your CPU when
balancing its trees -
 
> Is there any way for me to force a larger number of small disk writes so I can
> minimize the gaps in the display?
>
you could try renicing the disk-write job or you could try to sync the disk after 
writing a block but that would waste a lot of CPU (probably even making it worse)

if the data amount is resonably small (< 256MB) then you could think of writing
it to a RAMDISK (256MB of RAM are not that expensive at the moment) in 
compination with compressed formats you should be able to store a resonable 
amount of data in such a RAMDISK and that should eliminate any noticable 
CPU load due to data writes. 

hofrat
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/

Reply via email to