NetXMS Support Forum

Please login or register.

Login with username, password and session length

Author Topic: NetXMS loading time  (Read 333 times)

dersonik

  • Newbie
  • *
  • Posts: 28
    • View Profile
NetXMS loading time
« on: January 15, 2018, 02:35:01 pm »

It takes 1-2h for load NETXMS process - ubuntu 14.03
CPU usage is very high.
4GB RAM and SSD

Any ideas what causing issues?
Logged

dersonik

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: NetXMS loading time
« Reply #1 on: January 15, 2018, 03:09:14 pm »

How to clean database from old DCI or alerts?


I Found the problem, when NETXMS starting syncing/loading all alerts - I have over 1 million and how to clean this? Can't terminate because time out
« Last Edit: January 16, 2018, 11:07:54 am by dersonik »
Logged

Tursiops

  • Sr. Member
  • ****
  • Posts: 312
    • View Profile
Re: NetXMS loading time
« Reply #2 on: January 17, 2018, 09:54:45 am »

Hi,

I believe reducing the AlarmHistoryRetentionTime from the default of 180 days, followed by running the housekeeper process (which usually runs once a night, but can be triggered by opening the NetXMS Server Console and running "hkrun") should clean that up somewhat. The housekeeper may run for a very long time though.
Same with DCI data, you can set a DefaultDCIRetentionTime (or per DCI) as well as EventLog, AuditLog, Syslog and SNMPTrapRetentionTime.

Not sure what database you are running. If it's Postgres, make sure your autovacuums are running properly, especially on the raw_dci_values table.

Cheers
Logged

Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 6286
    • View Profile
Re: NetXMS loading time
« Reply #3 on: January 17, 2018, 11:24:48 am »

Hi,

I suggest to either truncate alarms table completely (but you will lose all alarm history) or delete alarms older than certain time before starting netxmsd. You can do this by running query

DELETE FROM alarms WHERE last_change_time < ?;

Replace placeholder with actual time stamp. It is in UNIX time format, you can use this calculator to get value: https://www.epochconverter.com/.

Best regards,
Victor
Logged