Why is save/load write/read soooo slooooow?
Mostra commenti meno recenti
I used a save myworkspace at a point when I want to interrupt a long process, and sometime later I do a load myworkspace to restore the interrupt point and continue.
The typical mat file produced by this procedure is 18 GB. The save takes 1200 seconds, the load takes 350 seconds. The times are the same using a single HDD or a SSD cluster in Raid0 configuration.
On the same computer I can use the OS to copy a 18 GB file in 65 seconds on HDD, 30 seconds on SSD.
So it appears that Matlab save/load have some serious bottlenecks. Is there anything I can do differently? Is this something I should raise to Mathworks Support?
9 Commenti
Ron Abileah
il 8 Set 2013
Modificato: Ron Abileah
il 8 Set 2013
Walter Roberson
il 8 Set 2013
"modified" HDF5
Ron Abileah
il 8 Set 2013
Cedric
il 8 Set 2013
netCDF and HDF5 are the two major libs/tools for managing large datasets storage/retrieval. They are both supported by MATLAB through sets of low to high level functions:
- http://www.mathworks.com/help/matlab/hdf5-files.html
- http://www.mathworks.com/help/matlab/network-common-data-form.html
From there, you'll have to perform a few tests saving/loading specific variables using regular save/load vs HDF5 functions (vs. netCDF), because I cannot tell you what improvement you'll get specifically with your setup and data. A last option could be to build your own C/MEX export function. But in all cases, I guess that you'll have to work/learn/test quite a bit before you get a real improvement, because nothing is straightforward with 18GB files.
Ron Abileah
il 10 Set 2013
Cedric
il 12 Set 2013
I think that even this partial answer will be useful information for the next persons who are facing this issue and who find your thread!
xingxingcui
il 24 Ago 2021
similar questions here, matfile and half inefficient storage
similar questions here, The “load” and “save” functions run very slowly?
Risposta accettata
Più risposte (1)
Categorie
Scopri di più su HDF5 in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!