From 44b50f413f44b0a4e5b412611ec78fb90c1886ac Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sun, 10 Aug 2014 14:13:00 +0100 Subject: [PATCH] update docs --- .../lib/App/Netdisco/Manual/Configuration.pod | 11 ++++---- .../lib/App/Netdisco/Manual/Developing.pod | 28 +------------------ Netdisco/share/environments/deployment.yml | 25 +++++++++-------- 3 files changed, 19 insertions(+), 45 deletions(-) diff --git a/Netdisco/lib/App/Netdisco/Manual/Configuration.pod b/Netdisco/lib/App/Netdisco/Manual/Configuration.pod index 45302073..135996ca 100644 --- a/Netdisco/lib/App/Netdisco/Manual/Configuration.pod +++ b/Netdisco/lib/App/Netdisco/Manual/Configuration.pod @@ -879,15 +879,14 @@ or remove any entries. Value: Settings Tree. Default: workers: - interactives: 2 - pollers: 10 - sleep_time: 2 + pollers: 'AUTO * 2' + sleep_time: 1 Control the activity of the backend daemon with this configuration setting. -C and C sets how many workers are started for -interactive jobs (port control) and polling jobs (discover, macsuck, arpnip) -on this node, respectively. Other nodes can have different settings. +C sets how many workers are started for interactive jobs (port +control) and polling jobs (discover, macsuck, arpnip) on this node. Other +nodes can have different settings. "C" is the number of CPU cores. C is the number of seconds between polling the database to find new jobs. This is a balance between responsiveness and database load. diff --git a/Netdisco/lib/App/Netdisco/Manual/Developing.pod b/Netdisco/lib/App/Netdisco/Manual/Developing.pod index db993165..61c63a13 100644 --- a/Netdisco/lib/App/Netdisco/Manual/Developing.pod +++ b/Netdisco/lib/App/Netdisco/Manual/Developing.pod @@ -54,9 +54,6 @@ For the daemon, it's very similar: DBIC_TRACE=1 ~/bin/localenv bin/netdisco-daemon-fg -Don't be alarmed by the high rate of database queries in the daemon - most of -them are communicating only with a local in-memory SQLite database. - Happy hacking! =head1 Introduction @@ -418,24 +415,12 @@ the central Netdisco database and booking out jobs which it's able to service according to the local configuration settings. Jobs are "locked" in the central queue and then copied to a local job queue within the daemon. -Along with the Manager we start zero or more of two other types of worker. -Some jobs such as port control are "interactive" and the user typically wants -quick feedback on the results. Others such as polling are background tasks -which can take more time and are less schedule sensitive. So as not to starve -the "interactive" jobs of workers we have two types of worker. - -The Interactive worker picks jobs from the local job queue relating to device -and port reconfiguration only. It submits results directly back to the central -Netdisco database. The Poller worker similarly picks job from the local queue, -this time relating to device discovery and polling. - There is support in the daemon for the workers to pick more than one job at a time from the local queue, in case we decide this is worth doing. However the Manager won't ever book out more jobs from the central Netdisco job queue than it has workers available (so as not to hog jobs for itself against other daemons on other servers). The user is free to configure the number of -Interactive and Poller workers in their C file (zero or more of -each). +workers in their C file (zero or more). The fourth kind of worker is called the Scheduler and takes care of adding discover, macsuck, arpnip, and nbtstat jobs to the queue (which are in turn @@ -458,17 +443,6 @@ Configuration for SNMP::Info comes from the YAML files, of course. This means that our C and C settings are now in YAML format. In particular, the C list is a real list within the configuration. -=head2 DBIx::Class Layer - -The local job queue for each Job Daemon is actually an SQLite database running -in memory. This makes the queue management code a little more elegant. The -schema for this is of course DBIx::Class using Dancer connection management, -and lives in L. - -There is currently only one table, the port control job queue, in -L. It's likely this name will change -in the future. - =head1 Other Noteable Technology =head2 C diff --git a/Netdisco/share/environments/deployment.yml b/Netdisco/share/environments/deployment.yml index 0d7f9814..98cab306 100644 --- a/Netdisco/share/environments/deployment.yml +++ b/Netdisco/share/environments/deployment.yml @@ -31,11 +31,11 @@ safe_password_store: true # SNMP community string(s) # ```````````````````````` snmp_auth: - - tag: 'v2default' + - tag: 'default_v2_readonly' community: 'public' read: true write: false -# - tag: 'v2default_w' +# - tag: 'default_v2_for_write' # community: 'private' # read: false # write: true @@ -56,16 +56,6 @@ snmp_auth: # expire: # when: '20 23 * * *' -# number of SNMP pollers to run in parallel (in netdisco-daemon) -# `````````````````````````````````````````````````````````````` -workers: - pollers: 10 - -# amount parallel DNS resolution for node names -# ````````````````````````````````````````````` -dns: - max_outstanding: 50 - # do not discover IP Phones or Wireless Access Points. # usually these are visible as device neighbors but don't support # SNMP, which just clogs up the job queue. @@ -74,6 +64,17 @@ discover_no_type: - '(?i)phone' - '(?i)(?:wap|wireless)' +# number of SNMP pollers to run in parallel (in netdisco-daemon). +# the default is twice the number of CPU cores +# ``````````````````````````````````````````````````````````````` +#workers: +# pollers: 'AUTO * 2' + +# amount parallel DNS resolution for node names +# ````````````````````````````````````````````` +#dns: +# max_outstanding: 50 + # set to true to globally disable authentication/login. # create a user called "guest" if you want to assign port/admin rights. # `````````````````````````````````````````````````````````````````````