Skip navigation.
Home
The QNX Community Portal

View topic - How can I write a lot of data in the RAM to file fast.

How can I write a lot of data in the RAM to file fast.

Discussion about the QNX6 OS.

How can I write a lot of data in the RAM to file fast.

Postby xuehuazhou » Thu Aug 09, 2012 3:32 am

My question is lots of data need to be save , but when I used fwrite() or write() , I found it too slow, maybe 20+M/s. However, the sata harddisk write /read speed up to 100-200M/s. And I 'm not sure the fwrite () or write() function using the DMA mode or PIO mode, how can I solve the problem. Please help me, thank you.
PS:I'm so sorry ,my English is poor ,so I am no sure that the problem is clear or not.
xuehuazhou
New Member
 
Posts: 2
Joined: Thu Nov 19, 2009 9:54 am

Re: How can I write a lot of data in the RAM to file fast.

Postby denkelly » Thu Aug 09, 2012 12:24 pm

read() and write() are faster then fread()/fwrite().
denkelly
Senior Member
 
Posts: 161
Joined: Sat Aug 02, 2008 3:27 pm

Re: How can I write a lot of data in the RAM to file fast.

Postby maschoen » Fri Aug 10, 2012 8:10 pm

xuehuazhou wrote:My question is lots of data need to be save , but when I used fwrite() or write() , I found it too slow, maybe 20+M/s. However, the sata harddisk write /read speed up to 100-200M/s. And I 'm not sure the fwrite () or write() function using the DMA mode or PIO mode, how can I solve the problem. Please help me, thank you.
PS:I'm so sorry ,my English is poor ,so I am no sure that the problem is clear or not.


The SATA read/write speeds you mentioned is probably the wire speed. That's the speed that data goes through the SATA cable. There are many other constraints. For example, on read, you will get no faster speed then the data passing under the heads. Once the write cache is filled, the same will be true on writes. There are numerous places that overhead can occur. The QNX file system is not known for blazingly fast I/O either. It is however optimized for multi process access.
maschoen
QNX Master
 
Posts: 2644
Joined: Wed Jun 25, 2003 5:18 pm


Return to QNX6 - OS

Who is online

Users browsing this forum: No registered users and 1 guest

cron