Folks,
I am trying to help someone with a problem with memory consumption with an ADSpinnaker camera. The problem is described in this Github issue:
https://github.com/areaDetector/ADSpinnaker/issues/7
I have been able to reproduce the problem with a BlackFly camera.
The problem occurs when the camera is in software trigger mode, in which a write to the TriggerSoftware PV causes the camera to acquire the next frame. The problem is that
the resident memory used by the ADSpinnaker application appears to increase slowly, but without bounds, in this mode. The user has reported that with 3 IOCs running the system memory runs out after a few days, and it hangs up.
These are the results of 3 acquisitions, each of 1000 frames in this mode. I used “top” to get the value of VIRT and RES at the beginning and end of each acquisition.
The value of RES was gradually increasing during the entire acquisition.
|
VIRT
|
RES
|
Start
|
7508244
|
306452
|
Stop
|
7508244
|
308624
|
Difference
|
0
|
2172
|
|
VIRT
|
RES
|
Start
|
7508244
|
309124
|
Stop
|
7508244
|
311240
|
Difference
|
0
|
2116
|
|
VIRT
|
RES
|
Start
|
7508244
|
311468
|
Stop
|
7508244
|
313536
|
Difference
|
0
|
2068
|
Note that the virtual memory (VIRT) is not increasing at all. I think this says that there is not a normal memory leak. However, the RES memory is increasing by about
2000 KB for 1000 images, or 2 KB per image. This increase per image is much less than the size of the image, which is 2 MB.
This is the result when using the normal internal trigger (free-run) mode of the camera. Note that RES actually decreased slightly, so there is no problem in this mode.
|
VIRT
|
RES
|
Start
|
7508244
|
313788
|
Stop
|
7508244
|
313628
|
Difference
|
0
|
-160
|
Can someone explain what can cause RES to increase without bounds, while VIRT is not changing at all?
Thanks,
Mark