Hello,
I made a software that writes about 30 kB of data on SD creating a new file each time. If I leave this software running for some days I find that the writing time increases from about 20 secs to about 50 secs when there are about 10000 files.
Does anyone have any reason for this happening?
SD card write times
Started by Ferocildo, Aug 21 2012 09:41 AM
4 replies to this topic
#1
Posted 21 August 2012 - 09:41 AM
#2
Posted 21 August 2012 - 09:45 AM
Hi,
I could imagine file system fragmentation. Could you try of defragmenting the SD card makes it fast again?
I know Fabien Royer from the Nwazet team did a SD durability test last year with a Netduino Mini which scored quite well if I'm correct;
http://yfrog.com/kjsr9qyj
I'll point him to this thread, maybe it sounds familiar to him.
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#3
Posted 21 August 2012 - 12:40 PM
Could well be a limitation of the FAT file system, seem to remember 10000 was the upper limit of files a folder could support, A quick fix to see if the problem is caused by sheer number of files would be to to create and write to a new folder every 1000 writes, i suspect this may be the root cause of your performance bottle neck, if nothing else the FS has to enumerate files so the less files it has to enumerate per folder the quicker it should be.
As for fragmentation, highly unlikely as its not a spinning disk most flash based storage writes in continuous contiguous chunks.
Nak.
#4
Posted 30 August 2012 - 09:35 AM
Well,
The problem was the FAT file system ( default windows formatting ). Using FAT32 I could write thousands of file on the same directory.. however writing times degrade with increasing number of files on the same directory
#5
Posted 30 August 2012 - 09:59 AM
Well,
The problem was the FAT file system ( default windows formatting ). Using FAT32 I could write thousands of file on the same directory.. however writing times degrade with increasing number of files on the same directory
That figures, have you tried creating a new folder every 1000 writes?, that should alleviate some of the issues with increasing write times...
Nak.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users