Closed mexanick closed 5 years ago
Ah "oops" I guess is all I can say. Is this resolved by #33?
@mexanick and @jsturdy I was on holiday when #33 was merged in but now that latencyScan2D
it causes problems for the latency scan tool anaXDAQLatency.py
and this was a useful histogram, see:
Is there opposition to adding this histogram back? Was there, perhaps not, a commit that could be reverted to restore just this histogram.
I think we have the memory for this histogram...? The threshold histograms I agree we should remove since right now there's no mechanism that could even fill them (no scan application). Also the other latency histograms were note being used.
@bdorney this can be retrofitted. Not possible to add via the cherrypick I think, but it is easy to do manually. Just to do it in one go: could you please take a good look on the current histogramming content and let me know which ones you want to add back? Also consider data-types reduction where appropriate (e.g. float instead of double, int instead of float etc)
Brief summary of issue
Current version of
gem-light-dqm
consumes all available RAM + very large swap space, totally amounting around 13GB. Initial suspicion that we have a memory leak somewhere appears to be incorrect. In fact, such large memory consumption is not a bug, but a "feature".According to R. Brun, a size of a histogram in memory equals to:
sizeof(TObject) + sizeof(Title) + sizeof(Name) + sizeof(Type_t)*(n_bins+2)
whereTObject
is a histogram type (e.g.TH1D
) andType_t
is its data type (e.g.Double_t
forTH1D
). I have calculated the memory size for VFAT histograms and got following:which gives ~14.5 MB per single VFAT. For a current system of 3 AMC's assuming all links are active, it gives ~14.52412*3 = 12.5GB of memory required - and this doesn't account for
GEB
,AMC
andAMC13
histograms.Types of issue
Expected Behavior
The application should not consume all available RAM
Current Behavior
Consumes about 7GB of RAM + 6GB of swap.
Steps to Reproduce (for bugs)
Just run the tool and look at the output of
top
commandPossible Solution
Such huge memory consumption edges the limits of our QC8 PC and leads to crashes in the
dqm
code. This is caused by improper application of the light dqm tool which has been initially developed as an expert tool for small systems debugging. As a short time solution I propose to strip down a number of histograms. MainlyVFAT
ones: two-dimensional latency scans and per-channel threshold scan distributions plus some others. This will allow to run the tool with fairly modest RAM consumption (3-4% of total RAM) and make the application much more stable. Of course, a central online DQM has to be implemented in the near future.Your Environment
develop