memmapfile system memory usage and transfer rate
이전 댓글 표시
Hi, I'm trying to use memory mapped files to transfer data between Matlab instances. The data isn't huge, only about 100MB. I noticed that when I'm writing, my memory usage goes up way more than the size of the data. (More than 1GB). It's also much slower than I expected, about 35MB/second. I have 4GB of physical memory and I haven't hit that limit yet so I don't think I'm paging. Sure seems like I'm still writing to disk. Anybody run into this issue or is it just me ?
채택된 답변
추가 답변 (1개)
Anthony Barone
2017년 3월 9일
0 개 추천
Are you using memory mapped .mat files? If so, and this is just a guess, but it could be because .mat files use compression (well, the v7 (default) and v7.3 ones do). This means that it takes some work to compress them while saving and while loading data (hense the extra memory usage and the slow response time). Unless your data would benefit from compression (example: it is mostly zeros), then saving and reading uncompressed data would probably be faster and use less memory.
Here is some information related to saving performance of different types of files (.mat and other): http://undocumentedmatlab.com/blog/improving-save-performance . It may be of interest to you for this issue.
댓글 수: 1
Walter Roberson
2017년 3월 9일
I would think that .mat files cannot be memory mapped as anything other than byte streams, as they do not have binary structures that could be easily translated into structures and arrays.
카테고리
도움말 센터 및 File Exchange에서 Large Files and Big Data에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!