Hardware How to format SD card for the best performance?

  • Thread starter Thread starter SomeGamer
  • Start date Start date
  • Views Views 22,281
  • Replies Replies 9

Best method of formatting SD card?

  • SDFormatter

    Votes: 5 33.3%
  • 64k cluster size

    Votes: 10 66.7%

  • Total voters
    15

SomeGamer

Well-Known Member
Member
Joined
Dec 19, 2014
Messages
6,827
Reaction score
3,432
Trophies
2
XP
5,129
Country
Antarctica
I just got a brand new 64GB SDXC Class 10 UHS card. Did a quick search on how I can get the fastest read / write speed out of it. Many recommended using SDFormatter, but here on GBAtemp people were talking about formatting for 64k cluster size. Obviously I can only do one of them.
So which is better? I don't want to start moving my games over just yet, knowing I might have to reformat it later.
Take your choice in the poll above and thanks a lot for your help!
EDIT: Don't use SDformatter, see Featured Post #5
 
Last edited by SomeGamer,
Format with SD Formatter than reformat as 64k cluster size.

Also, SD Formatter will format as ExFAT so it is useless for 3DS without reformatting. This is because SDXC specs have ExFAT as the filesystem and not FAT32.
 
Last edited by driverdis,
Format with SD Formatter than reformat as 64k cluster size.

Also, SD Formatter will format as ExFAT so it is useless for 3DS without reformatting. This is because SDXC specs have ExFAT as the filesystem and not FAT32.
I completely forgot about the SDXC ExFAT thing! So it's 64k cluster size with some third party formatting tool. Thanks!
 
From Nintendo site itself.
They told to use SD Formatter.

Of course they did. Nintendo only supports SD Cards 32GB and under in the 3DS, which SD Formatter will format them as FAT32 as per SD/SDHC specs.

However, any cards larger than 32GB will be formatted as ExFAT by SD Formatter as per the SDXC specs and will not work in the 3DS until formatted as FAT32.

SD Formatter is designed to guarantee maximum compatibility with devices as it formats SD Cards exactly to meet the SD/SDHC/SDXC specs.
SDXC specs are ExFAT, not FAT32 so that is what SD Formatter will use.
 
Last edited by driverdis,
If you want to go really far with this, run benchmarks to determine the card's erase block size, then align partitions to it. With this, you may also notice certain quirks your card may have.
 
If you want to go really far with this, run benchmarks to determine the card's erase block size, then align partitions to it. With this, you may also notice certain quirks your card may have.
Which program would you recommend for benchmarking?
 
Which program would you recommend for benchmarking?
The process is actually very involved: (Not everything is relevant, read FAT Optimization) https://wiki.linaro.org/WorkingGrou...WorkingGroups/Kernel/Projects/FlashCardSurvey
Also: https://raspberrypi.stackexchange.c...erformance-for-record-size-8-128-kb-drops-bel
Benchmark tool: (Read above first) https://github.com/bradfa/flashbench

In reality it doesn't really matter how you format it. If it works it most likely works well enough, anything else will just give negligible advantages, if any at all.
 
A relatively simple optimization, presuming your use is 90% read-only (true for 3DS usage):

After the SD card is mostly or fully setup with the files you will normally use, the following steps will optimize the layout slightly. I'll use drive letter S:\ as the one for the SD card, and temporary folder D:\TempSD\ as the temporary location on your computer for files....
  1. REM -- Copy the files from the SD card into the temporary holding area
    Robocopy S:\ D:\TempSD /E
  2. REM -- Re-format the SD card
    (e.g., using EmuNAND9 on 3DS)
  3. REM -- Create the file system structures with zero-byte placeholder files
    Robocopy D:\TempSD S:\ /E /CREATE
  4. REM -- Now copy the actual file data back to the SD card
    Robocopy D:\TempSD S:\ /E
Specifically, the above achieves two results:
  • The file system's metadata is stored contiguously at the start of the SD card. This can reduce the number of actual reads required to locate data on the card. This portion is most useful when used on media that has been heavily used, and thus has fragmented the file system. For example, the 3DS often will lookup directories 4+ levels deep, requiring one logical read per level. If the file system metadata is contiguous, it may require fewer actual reads.
  • All file data is stored contiguously. This minimizes the number of actual reads required to read the contents of files.
There's actually a whole lot of additional micro-optimizations that you can do. For example, knowing which files are read, and in which order, you can layout the file system such that the data requested is physically contiguous. You can ensure the most-often used directories (such as "Nintendo 3DS") are in the first sector of each directory (avoiding multiple reads to find the subdirectory of interest). Etc.

Formatting the media is useful, but most improvement (vs. well-used card with same data) will come from defragmentation. The above steps are the simplest method to do this, without use of 3rd party tools, at the cost of time moving the data off the card and back on.
 

Site & Scene News

Popular threads in this forum