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!