NetXMS Support Forum

English Support => General Support => Topic started by: dersonik on January 15, 2018, 02:35:01 PM

Title: NetXMS loading time
Post by: dersonik 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?
Title: Re: NetXMS loading time
Post by: dersonik 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
Title: Re: NetXMS loading time
Post by: Tursiops 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
Title: Re: NetXMS loading time
Post by: Victor Kirhenshtein 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/ (https://www.epochconverter.com/).

Best regards,
Victor