Hi everybody,
I just installed MATLAB on a SD card (SDXC 256Gb from Samsung) and I cannot figure out how come the dimension of the programme is about 10Gb, though the actual storage occupied on the disk is about 95Gb.
I'm attaching what comes out in the property of the folder where MATLAB is installed. (I'm sorry if it is written in italian).

 Réponse acceptée

Rik
Rik le 10 Déc 2020

0 votes

I'm guessing you have a fairly large sector size on your SD card.
Most file systems store files in sections called sectors. If a file is small it will not take up an entire sector, but the file system can't use the sector for another file as well. Bigger files might be larger than a single sector, in which case multiple sectors are used for a single file, but again: if it doesn't completely fill the last sector, that extra space is wasted.
There is a trade-off for sector size: in general bigger sector will be faster, but cause more waste for small files. SD cards tend to be formatted with large sectors, since they will hold photo or video files, which are much larger than a sector, so large sectors are not expected to cause waste.

5 commentaires

Is there a way to fix this?
Rik
Rik le 10 Déc 2020
Reformat your SD card with smaller sectors. The built-in Windows tool apparently calls this 'allocation unit size'.
In the case where I use a format too small will make MATLAB to be slow?
Thank you a lot for the help.
Rik
Rik le 10 Déc 2020
I know enough of this subject to know that this is likely the cause of this issue (mainly due to medical images being stored as a large number of small files, leading to about 10% waste on most systems), but not enough to recommend a setting. I would suggest figuring out what your current sector size is, and trying again at half or a quarter of the size. The drive where I have installed Matlab appears to have defaulted to 4096 bytes, and the size on disk is 13.6GB (while the size is 12.9GB).
The problem was that. I formatted the SD card and used NTFS with a 4kb unit of allocation instead of exFAT 256kb and it works greatly. Thank you very much!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by