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.
3 posts
• Page 1 of 1
How can I write a lot of data in the RAM to file fast.
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.
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.
read() and write() are faster then fread()/fwrite().
- denkelly
- Senior Member
- Posts: 163
- Joined: Sat Aug 02, 2008 3:27 pm
Re: How can I write a lot of data in the RAM to file fast.
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: 2728
- Joined: Wed Jun 25, 2003 5:18 pm
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 1 guest