Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
* * * * * root /usr/local/nmis8/bin/nmis.pl type=collect abort_after=60 mthread=true ignore_running=true;

The cron .d configuration can be found in /etc/crond.d/nmis. 

For a collect or an update, the main thread is set up by default to create forks fork worker processes to perform the requested operations using threads and improving performance. One of each operations operation will run every minute (by default), and will process as many nodes as the collect polling cycle is set up to process

Configurations that affect performance

...

  • abort_afterFrom NMIS 8.6.8G there is a new command line option, abort_after, that prevents the main thread to run for a long time, preventing it to collide from with the next cron job. By default, this parameter is 60 seconds, as the cron job is set to run every 60 minutes by default

    This Also, this option always needs to always have also the option mthreads=true. 

    Code Block
    nmis8/bin/nmis.pl type=collect abort_after=60 mthread=true ignore_running=true;


  • max_thread: The other important configuration option is max_thread, that will prevent the number of children of the main process be to grow too big. Considerations:
    • If the collect operation has a lot of nodes to process, the number of children won't reach the limit instantly. While the main thread is forking, the children complete their jobs and will exit. Also, the main process will wait for them to change their state so the number will increase slowly.
    • NMIS can have more than one instance of the main process running, and the number of children could be higher that max_threads, as the limit is only per instance. 
  • sort_due_nodes: When NMIS decides what to poll it can do some so in a pseudo random order which is the default, if your server is overloaded you will likely see some nodes never getting polled, hence pseudo random, so for heavily loaded servers, enable sort_due_nodes, in the NMIS configuration add with the value set to 1.

...

A symptom of an overloaded server can be the gaps in the graphs. 

This Below is an example about how these parameters can impact in the performance of the server, in a server with 64 CPUs and more than 3700 nodes: 

When

abort_after

(seconds)

demote_faulty_nodesCPUNodes No Not CollectedOther
Initial ConfigurationDefault (60 seg)false<50% (Aprox.)1100 ~
totalPoll=3713 ontime=891 1x_late=1460 3x_late=41 12x_late=56 144x_late=1265
Test 1 Test120true<50% (Aprox.)500 ~N/A
Test 2 Test240true<60% (Aprox.)240 ~
totalPoll=1229 ontime=998 no_snmp=14 demoted=0 1x_late=217 3x_late=0 12x_late=0 144x_late=0
Test 3 Test0 (Disabled)trueAround 100% (Aprox.)0Took 7 minutes. Processed >3000 nodes. Disabled cron
Test 4 Test0 (Disabled)true100% (Aprox.)N/ACommented while (wait for children) in nmis.pl
Test 5 Test0 (Disabled)false100% (Aprox.)N/AN/A

Note that problems in the modelling that throughs throw errors in the logs can also make the system slow. The polling time for each node will be increased, hence the polling cycle will take longer to run, and depending on the configuration options, the process can be aborted with some nodes without not being polled. 

(Internal case reference: SUPPORT-6976)