Enrico,
your one is not a silly question. I tested both "write" and "fwrite" functions, 
reaching the best performances with "fwrite" that AFAIK is buffered.
I also tried splitting the write on the file pointer / file descriptor on 
packets of 32 kBytes (the drivers try to write 64 packets, 512 bytes long), but 
the best solution I found until now on the FAT file system is:
fwrite without splitting the frames. So basically I have a loop for every video 
file where the software writes a frame at a time.

Thanks for your help,
ciao Daniele



-----Messaggio originale-----
Da: [email protected] 
[mailto:[email protected]] Per conto di 
Enrico Butera
Inviato: martedì 12 luglio 2011 17.12
A: [email protected]
Oggetto: Re: bad sd card write performance

On Tue, Jul 12, 2011 at 12:17 PM, Bosi Daniele <[email protected]> wrote:
> Hi all,
> I have an application that is writing 2 D1 h264 videos on the SD card and I 
> see some slowdown on the thread that is saving the videos on sd card,  when 
> it is mounted with the "sync" option.
>
> I mean with a bitrate lesser than 1 MByte (2 D1 h264 videos), using a class 
> 10 SD card mounted with the SYNC option, I can write on sd card at a frame 
> rate of max 20 fps on both the videos, while the capture tasks are running at 
> 25 fps.
>
> This means that I'm loosing 5 captured frames every sec on both the videos!
>
> So my question is: is there a way to improve the driver write performance on 
> the SD card?
>
> BTW the used file system is FAT32 and the hardware has a DM368 cpu with Linux 
> kernel 2.6.18 from Udworks
>
> For us the "sync" option is a requirement, because the system should be power 
> cut safe.
>
> Does anyone encountered the same problems?
>

Silly question: are you buffering before writing on disk? I mean: if
you make many small writes you'll never reach the SD theoretical write
speed in sync mode, especially with two separate files.

I made some tests (on an omap platform) and i found out that the best
filesystem for this kind of work is nilfs but unfortunately i think
your kernel is too old to support it.

Ciao,

Enrico
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to