Forum Discussion

Nishok_315319's avatar
Nishok_315319
Icon for Nimbostratus rankNimbostratus
May 11, 2017

CommonStatistic objects occupies more heap during execution and does not clean up during GC

I am collecting various statistics for device and its objects as well, by using iControl (code below) . CommonStatistic objects are getting piled up in my heap and is not cleared during GC(suspecting that its getting stored in the tenured space directly). This is causing Outofmemory error after certain repeated stats collections

 

Device level
final SystemStatisticsBindingStub systemStatistics = iControl.getSystemStatistics();
final SystemCPUUsageExtended[] hosts = retrieveCPUUsageExtendedInformation(device, iControl);

        for (SystemCPUUsageExtended systemCPUUsageExtended : hosts) {
                final CommonStatistic[][] statistics1 = systemCPUUsageExtended.getStatistics();
                for (CommonStatistic[] commonStatistics : statistics1) {
                    for (CommonStatistic commonStatistic : commonStatistics) {
                        doSomething();
                    }
                }
            }
Object level
objectStatistics = iControl.getGlobalLBPool().get_statistics(objectList);
final GlobalLBPoolPoolStatisticEntry[] statistics = getStatistics.getStatistics();
            for (GlobalLBPoolPoolStatisticEntry globalLBPoolPoolStatisticEntry : statistics) {
                final CommonStatistic[] statistics2 = globalLBPoolPoolStatisticEntry.getStatistics();
                    for (CommonStatistic commonStatistic : statistics2) {   
                    doSomething();
                    }
            }

Any suggestions/solutions please...

 

No RepliesBe the first to reply