memmapfile system memory usage and transfer rate
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Marty
am 4 Jan. 2012
Kommentiert: Walter Roberson
am 9 Mär. 2017
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 ?
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 4 Jan. 2012
Memory mapping uses the file system by definition.
If your instances are on the same node, then what you want is instead a shared memory segment. MATLAB does not support shared memory itself, but you can find MATLAB File Exchange contributions that handle it.
Weitere Antworten (1)
Anthony Barone
am 9 Mär. 2017
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 Kommentar
Walter Roberson
am 9 Mär. 2017
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.
Siehe auch
Kategorien
Mehr zu MATLAB Functions in Microsoft Excel finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!