API methods updateDeviceTemplate and associateDeviceTemplate taking too long.
- At work we have OpManager 11600 LEE with 50 devices.
- Each device has an average of 1300 interfaces.
- Each device has a single custom template
I have a script that loops through each device and update his template (updateDeviceTemplate) with an average of 500 custom monitors,after that the script update the device with the custom template (associateDeviceTemplate) and finishes.
The problem is that both methods takes too long to complete:
updateDeviceTemplate takes 30 - 60 minutes.
associateDeviceTemplate takes the same time.
This is a problem beacuse i need to update all my monitors every day and if i create threads for that script then the methods described takes even longer to complete, it was running better a month ago (20 - 40 minutes to complete operations).
I found that consuming method (updateDeviceTemplate) always create threshold objects and the table is more than 1GB now:
OpManagerDB=# EXPLAIN SELECT * FROM thresholdobjects;
QUERY PLAN
-----------------------------------------------------------------------------
Seq Scan on thresholdobjects (cost=0.00..190974.53 rows=4251453 width=241)
(1 row)
The other tables seems reasonably in size, the top(80) big ones are :
relation | total_size
-----------------------------------------------+------------
public.ifhcdailyrate_2015_10_28_11 | 3454 MB
public.statsdata_hourly_2016_05_19_24 | 3263 MB
public.statsdata_hourly_2016_06_09_24 | 3258 MB
public.ifhchourlyrate_2016_06_15_24 | 3111 MB
public.ifhchourlyrate_2016_06_06_24 | 3111 MB
public.ifhchourlyrate_2016_06_24_24 | 3093 MB
public.ifhchourlysum_2016_06_15_24 | 2245 MB
public.ifhchourlysum_2016_06_06_24 | 2243 MB
public.ifhchourlysum_2016_06_24_24 | 2232 MB
public.ifhcraw_2016_07_02_18 | 2215 MB
public.ifhcraw_2016_07_03_12 | 2214 MB
public.ifhcraw_2016_06_29_24 | 2214 MB
public.ifhcraw_2016_06_29_18 | 2213 MB
public.ifhcraw_2016_07_01_6 | 2211 MB
public.ifhcraw_2016_07_04_6 | 2211 MB
public.ifhcraw_2016_07_05_24 | 2209 MB
public.elementavailabilityhourly2016_06_20_24 | 2204 MB
public.elementavailabilityhourly2016_06_28_24 | 2204 MB
public.ifhcraw_2016_07_02_24 | 2203 MB
public.elementavailabilityhourly2016_06_12_24 | 2201 MB
public.ifhcraw_2016_06_30_12 | 2198 MB
public.elementavailabilityhourly2016_06_04_24 | 2197 MB
public.ifhcraw_2016_07_05_18 | 2191 MB
public.elementavailabilitydaily2015_10_28_11 | 2022 MB
public.statsdata_daily_2015_10_28_11 | 1533 MB
public.thresholdobjects | 1473 MB
public.ifhchourlyrate_2016_07_03_24 | 1266 MB
public.statsdata_hourly_2016_06_30_24 | 957 MB
public.ifhchourlysum_2016_07_03_24 | 917 MB
public.elementavailabilitydaily2016_05_02_24 | 748 MB
public.ifhcdailysum_2015_10_28_11 | 623 MB
public.ifhcraw_2016_07_06_12 | 590 MB
public.statsdata6_29_2016 | 525 MB
public.statsdata6_30_2016 | 523 MB
public.statsdata7_5_2016 | 520 MB
public.statsdata7_1_2016 | 514 MB
public.statsdata7_2_2016 | 511 MB
public.statsdata7_3_2016 | 511 MB
public.statsdata7_4_2016 | 510 MB
public.event_2016_04_24_5 | 454 MB
public.statsdata7_6_2016 | 363 MB
public.elementavailabilityhourly2016_07_06_24 | 182 MB
public.parentdown2015_10_28_11 | 144 MB
public.tempparentdownhourly2015_10_28_11 | 104 MB
public.polleddata | 80 MB
public.ipaddress | 53 MB
public.managedobject | 43 MB
public.mapsymbol | 36 MB
public.snmpinterface | 29 MB
public.topoobject | 27 MB
public.audit_2015_10_28_11 | 17 MB
public.mapuserprops | 17 MB
public.datacollectionrate | 15 MB
public.graphdetails | 14 MB
public.childrenstatus | 12 MB
public.datacollectionrowdetails | 8360 kB
public.alert | 7920 kB
public.intferrorthreshold | 6136 kB
public.intfthresholdseverity | 5864 kB
public.intfutilthreshold | 5776 kB
public.intfdiscthreshold | 5760 kB
public.devicetographtothreshold | 5688 kB
public.downtime2015_10_28_11 | 4496 kB
public.managedobjectid | 4488 kB
public.faultrate | 4440 kB
public.availabilityelementid | 4384 kB
public.tempdowntimehourly2015_10_28_11 | 4368 kB
public.polldatatemplate | 4336 kB
public.graphtopollmap | 4256 kB
public.intfcommonthresholddetails | 3888 kB
public.vendorgraphdetails | 3400 kB
public.devicepackagetograph | 3008 kB
public.customgraph | 2968 kB
public.serverdiagnostics | 1832 kB
public.parentdownstart | 1320 kB
public.apiaccesslog | 504 kB
public.topodbspecialkey | 432 kB
public.devicetypetosysoid | 408 kB
public.snapshotdialgraphs | 360 kB
public.devicepackage | 248 kB
I will aprecciate any help :).
Jimmy Atauje Hidalgo.
New to ADSelfService Plus?