Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

SD card write times


  • Please log in to reply
4 replies to this topic

#1 Ferocildo

Ferocildo

    New Member

  • Members
  • Pip
  • 9 posts

Posted 21 August 2012 - 09:41 AM

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?

#2 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

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

#3 nakchak

nakchak

    Advanced Member

  • Members
  • PipPipPip
  • 404 posts
  • LocationBristol, UK

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 Ferocildo

Ferocildo

    New Member

  • Members
  • Pip
  • 9 posts

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 nakchak

nakchak

    Advanced Member

  • Members
  • PipPipPip
  • 404 posts
  • LocationBristol, UK

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

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.