Saving performance to different drive (hard drive, SATA SSD, M.2 SSD)
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I did a saving test, to continuously append data into a exist .mat file. I tested the code using:
1. 7200 rpm hard drive. 2. 850 EVO, SATA ssd. 3. 960 EVO, M.2 ssd.
the speed of my CPU is 3.0 Ghz, the speed of memory is ddr3 1600Mhz.
the result is: 90 seconds, 82 seconds, 80 seconds, respectively.
This is a little werid because as we know, SSD should have a significantly faster writing speed than hard drive, and the M.2 ssd should be much faster than SATA SSD.
but what I found in the test result, is that, the difference between hard drive and SSD is only about 10%, and the difference between SATA ssd and M.2 ssd is almost negligible.
just want know if there is any reason here, or if there is anyway to improve the performance.
below are the test code:
tic
test1=1;
save test1 test1
for i=1:1:1000
fprintf('%0dth data.\n',i)
eval(['tmp',num2str(i),'=1:1:2e5;'])
eval(['save(','''','test1','''',',','''','tmp',num2str(i),'''',',','''','-append','''',')'])
end
toc
Thanks!
Yu
2 commentaires
Andres Salazar
le 4 Juin 2019
I have a toshiba THNSN5512GPUK NVMe
16GB ddr4
Intel core I7 7th gen
NVIDIA GPU GTX 1050
It took 299.21 seconds
Jan
le 5 Juin 2019
Is there any reason to use eval? This might be the bottleneck of the code such that the speed of the disk is less relevant. In addition appending a variable to a MAT file requires to parse the MAT file at first, wuch that there is a huge overhead. If this overhead is 78 seconds on your machine, that times for writing would be: 22 sec, 4 sec, 2 sec. This might be realistic.
I think your code is not usful to measure the disk access performance.
Réponses (0)
Voir également
Catégories
En savoir plus sur Computer Vision Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!