I have a disk with sequential writing capability 1572 Mb/second
I have 4 cameras with 60 fps. Each frame is not coded and is 3.7 Mb (let's say 4 Mb) image. The writing speed I need is 4*4*60 = 960 Mb/s.
PointGrey provides examples with the code :
for (unsigned int uiCamera = 0; uiCamera < numCameras; uiCamera++)
{
error = retrieveImage(ppCameras[uiCamera], &image);
// error = ppCameras[uiCamera]->RetrieveBuffer(&image);
if (error != PGRERROR_OK)
{
PrintError(error);
cout << "Press Enter to exit." << endl;
cin.ignore();
return -1;
}
// Get the size of the buffer associated with the image, in bytes.
// Returns the size of the buffer in bytes.
iImageSize = image.GetDataSize();
// Write to the file
ardwBytesWritten[uiCamera] = writeFrameToFile(m_ALLCAMS, image);
};
where:
size_t writeFrameToFile(FILE* f, Image image)
{
return fwrite(image.GetData(),
1,
image.GetCols() * image.GetRows(),
f);
}
unfortunatelly, I can get only around 370 - 500 Mb/s writing speed in release mode (according to windows profiler).
writeFrameToFile is the slowest operation and it takes 12-13 ms in debug mode.
Does it make sence to parallel file writing, or ssd can not write in parallel threads? Shall I use multiple SSDs? Thank you.