Send netdisco-users mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/netdisco-users
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of netdisco-users digest..."
Today's Topics:
1. Re: node history? (Oliver Gorwits)
2. Re: Slow Search Performance (Pavel Skovajsa)
--- Begin Message ---
Hi all
I have created this wiki page:
https://github.com/netdisco/netdisco/wiki/Expiry
I hope it helps and does not just add to the confusion!!
regards
oliver
On Wed, 16 Sep 2020 at 10:00, Christian Ramseyer <[email protected]>
wrote:
> Hi Neil
>
> On 15.09.20 18:12, Johnson, Neil M wrote:
> > Could someone explain the relationship between expire_nodes,
> > expire_nodes_archive, and expire_node_ip_freshness?
> >
> >
> >
> > Our team has asked if it is possible to keep MAC address to port
> > mapping for a long period (up to 1 year).
> >
> >
> >
> > MAC to IP history is not that important, say 30-45 days.
> >
>
> Netdisco can easily keep some years of data, just set expire_nodes to
> 365/730/1095/(x * 365) and it works just fine. This will affect both the
> mac -> port and ip -> mac mappings.
>
> Sorry I'm not acquainted with the archive and freshness options, I
> realize they exist but I've never touched them. For me expire_nodes does
> all I want.
>
> A+
> Christian
>
>
> _______________________________________________
> Netdisco mailing list
> [email protected]
> https://sourceforge.net/p/netdisco/mailman/netdisco-users/
--- End Message ---
--- Begin Message ---
Christian,
The reindex and vacuum made the trick!
Unfortunately I did not manage to run the explain analyze before I did the
reindex, but now takes 45ms to run. Here is the explain:
https://explain.depesz.com/s/Pm66
Thanks a lot,
-pavel
On Thu, Sep 17, 2020 at 12:16 PM Christian Ramseyer <[email protected]>
wrote:
>
>
> On 17.09.20 10:06, Pavel Skovajsa wrote:
> > Anybody give me a hint?
> >
> > -pavel
> > ////////
> > SELECT me.mac, me.ip FROM ( SELECT ip, mac FROM device where mac =
> > any ($1::macaddr[])
> > UNION
> > SELECT ip, mac FROM device_port dp where mac = any
> > ($2::macaddr[])
> > ) me GROUP BY mac, ip
> > 2020-08-09 00:00:46.997 EDT [537360] netdisco@netdisco DETAIL:
> > parameters: $1 = '{00:05:9b:cf:1c:1a}', $2 = '{00:05:9b:cf:1c:1a}'
> >
> > //////////
>
> Hi Pavel
>
> To fill in the array parameters, paste the whole string including the
> "'{". Then run it with "explain analyze", e.g:
>
> explain analyze SELECT me.mac, me.ip FROM (
> SELECT ip, mac FROM device where mac = any
> ('{00:05:9b:cf:1c:1a}'::macaddr[])
> UNION
> SELECT ip, mac FROM device_port dp where mac = any
> ('{00:05:9b:cf:1c:1a}'::macaddr[])
> ) me GROUP BY mac, ip
>
> Can you paste the output into https://explain.depesz.com/ and share the
> link? This will nicely show where the slowness occurs. For comparison, I
> have 450k records in device_port and device combined, and it finishes in
> 6ms.
>
> Usually slowness over time occurs because tables and indexes can become
> "bloated" by having many pages (blocks on the file system) with mostly
> deleted rows in it. Postgres does not consolidate these on its own.
> Vacuum and reindexing help, check the "Things are getting really slow"
> section here:
> https://github.com/netdisco/netdisco-legacy/blob/master/README
>
> It's for Netdisco 1.x but the essential advice is still correct, stop
> all netdisco processes (-web and -backend) then run these:
>
> REINDEX TABLE node;
> REINDEX TABLE node_ip;
> REINDEX TABLE device;
> REINDEX TABLE device_port;
> REINDEX TABLE device_port_log;
> VACUUM FULL ANALYZE VERBOSE;
>
>
>
> Cheers
> Christian
>
--- End Message ---
_______________________________________________
Netdisco mailing list - Digest Mode
[email protected]
https://lists.sourceforge.net/lists/listinfo/netdisco-users