Why is save/load write/read soooo slooooow?
古いコメントを表示
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 件のコメント
Ron Abileah
2013 年 9 月 8 日
編集済み: Ron Abileah
2013 年 9 月 8 日
Walter Roberson
2013 年 9 月 8 日
"modified" HDF5
Ron Abileah
2013 年 9 月 8 日
Cedric
2013 年 9 月 8 日
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
2013 年 9 月 10 日
Cedric
2013 年 9 月 12 日
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
2021 年 8 月 24 日
similar questions here, matfile and half inefficient storage
similar questions here, The “load” and “save” functions run very slowly?
採用された回答
その他の回答 (1 件)
カテゴリ
ヘルプ センター および File Exchange で HDF5 についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!