I do not have enough memory to create a queue large enough to buffer all the images. 2BM wants to acquire the camera stream for at least 15 minutes and ideally as long as possible. So talking about 2-4 TB. Or larger if the buy huge nvme chips or multiple turbo Z units – the computer supports having 3 of them.
I have allocated very large buffers, but for a 4096 by 3078 image being created at 190 FPS, the file plugins would have to be able to keep up . . . and they don’t.
Using the SimDetector, I can create such images at ~260 FPS. HDF is only writing the file out at about 60 FPS, using whatever the defaults settings. NetCFD writes about 30 FPS. A buffer of 4000 in both cases only lasted for about a minute. The raw file plugin slows the simDetector acquire rate to about 170-180 FPS, which the plugin can keep up with. The stardardarray plugin by itself also slows simDetecor to about the same thing.
From: Mark Rivers [mailto:firstname.lastname@example.org]
Sent: Tuesday, June 27, 2017 1:06 PM
To: 'Mark S. Engbretson' <Engbretson@anl.gov>; email@example.com
Subject: RE: Area Detector and high performance NVME devices
I am surprised that a raw file plugin is significantly faster than netCDF or HDF5. I would like to see the tests, and figure out what is actually slowing them down, i.e. is it CPU bound, waiting for a semaphore, etc.? Can you post actual benchmark results for the different plugins, i.e. frames/s and MB/s?
You should not need to do anything special to create a FIFO to buffer images while the disk is busy. Every areaDetector plugin comes with such a FIFO, i.e. its input queue. Just increase the QueueSize to be large enough to buffer all the images you need to store in one "burst". You can also use the CircularBuffer plugin to do this, but it should really not be necessary, that is intended more for "triggered" applications where the buffer is emptied when a trigger condition is satisfied.
I have the adimec camera which generates data at ~2.5 GB/s. I recently got my hands on a newer HP 840 with a HP Turbo Z nvme drive which claims a sustained write speed of 6 GB/S. None of the existing file plugin see any performance increase when writing to this device – I do not think that any are actually write limited. I have modified a raw binary file plugin that I obtained from Keenan Lang that easily sustains the cameras write rate until the device is full.
Problem is – Raw data really doesn’t do anyone much good. I was thinking that perhaps a quick solution to my problem might be to change this Raw File plugin to look/act like a disk based fifo or circular buffer. This could collect to the limit of the hardware at full speed, and if someone wanted HDF output, they would just drain this queue at the speed that HDF files are generated. Or is there an easier/better solution? I.e. any way that file plugins can use the new multi-thread model of AD 3.0?
I know the HDF files can be generates at very high speeds on Lustre file systems, but this seems to be using parallel HDF5. Is this something that Area Detector supports?