refactor: Further speed improvements to port poller #6037

Merged
merged 1 commit into from Mar 8, 2017

Conversation

Projects
None yet
7 participants
@laf
Member

laf commented Feb 28, 2017

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

  • Have you signed the Contributors agreement - please do NOT submit a pull request unless you have (signing the agreement in the same pull request is fine). Your commit message for signing the agreement must appear as per the docs.
  • Have you followed our code guidelines?

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926

Improved the selected ports polling section, we don't need to do the full walk as that still causes issues with devices with a lot of ports. It may add a small increase for low port number devices with all enabled and up ports but this feature didn't help with that before.

For me on a device with high latency, ports went from 170~ to 120~.

@mention-bot

This comment has been minimized.

Show comment
Hide comment
@mention-bot

mention-bot Feb 28, 2017

Thank you for submitting a PR @laf! We have found the following @murrant, @tuxis-ie and @BarbarossaTM based on the history of these files to review this PR.

Thank you for submitting a PR @laf! We have found the following @murrant, @tuxis-ie and @BarbarossaTM based on the history of these files to review this PR.

@LibreNMS-CI

This comment has been minimized.

Show comment
Hide comment
@scrutinizer-notifier

This comment has been minimized.

Show comment
Hide comment
@scrutinizer-notifier

scrutinizer-notifier Feb 28, 2017

The inspection completed: No new issues

The inspection completed: No new issues

@wriedel

This comment has been minimized.

Show comment
Hide comment
@wriedel

wriedel Feb 28, 2017

Hi Laf, very cool. For a Cat4503/SUP8e with 96ports where I already had disabled all non needed modules I am now down to 25sec from 50sec! I see similar results on NEXUS as well. (35 down to 20sec)
Question: For Pollers, Poller history, there is a line-item listing for every device. Is there a way to have a graph visualizing all this and also give me an aggregated number for a polling cycle?
Would make the saving more visual ;-)

wriedel commented Feb 28, 2017

Hi Laf, very cool. For a Cat4503/SUP8e with 96ports where I already had disabled all non needed modules I am now down to 25sec from 50sec! I see similar results on NEXUS as well. (35 down to 20sec)
Question: For Pollers, Poller history, there is a line-item listing for every device. Is there a way to have a graph visualizing all this and also give me an aggregated number for a polling cycle?
Would make the saving more visual ;-)

@wriedel

This comment has been minimized.

Show comment
Hide comment
@wriedel

wriedel Mar 1, 2017

Hi Laf, is this by design that ports being identified by that feature gets deleted?

wriedel commented Mar 1, 2017

Hi Laf, is this by design that ports being identified by that feature gets deleted?

@laf

This comment has been minimized.

Show comment
Hide comment
@laf

laf Mar 1, 2017

Member

No

Member

laf commented Mar 1, 2017

No

@wriedel

This comment has been minimized.

Show comment
Hide comment
@wriedel

wriedel Mar 1, 2017

you need more debugs or anything else?

wriedel commented Mar 1, 2017

you need more debugs or anything else?

@laf

This comment has been minimized.

Show comment
Hide comment
@laf

laf Mar 1, 2017

Member

Full port debug for poller and discovery

Member

laf commented Mar 1, 2017

Full port debug for poller and discovery

@laf

This comment has been minimized.

Show comment
Hide comment
Member

laf commented Mar 7, 2017

@murrant murrant merged commit 58442e0 into librenms:master Mar 8, 2017

2 checks passed

Auto-Deploy Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@laf laf deleted the laf:port-poll-perf2 branch Mar 8, 2017

@LoZio

This comment has been minimized.

Show comment
Hide comment
@LoZio

LoZio Mar 14, 2018

Running LibreNMS | 1.37-40-g6b68d5f
I checked one of the files in your commit and see different code in my setup as of today (Mar 13). There is some special procedure to do to have your patch without switching to a specific PR?
I'm desperately trying to lower my poll times and this coud be very useful.
Do I need to configure something to enable this patch?
Sorry for my dumbness

LoZio commented Mar 14, 2018

Running LibreNMS | 1.37-40-g6b68d5f
I checked one of the files in your commit and see different code in my setup as of today (Mar 13). There is some special procedure to do to have your patch without switching to a specific PR?
I'm desperately trying to lower my poll times and this coud be very useful.
Do I need to configure something to enable this patch?
Sorry for my dumbness

@murrant

This comment has been minimized.

Show comment
Hide comment
@murrant

murrant Mar 14, 2018

Member

You already have this code.

Please read this https://docs.librenms.org/Support/Performance/

Member

murrant commented Mar 14, 2018

You already have this code.

Please read this https://docs.librenms.org/Support/Performance/

@LoZio

This comment has been minimized.

Show comment
Hide comment
@LoZio

LoZio Mar 14, 2018

I read that doc and I'm experimenting with all the parameters to find the better setup for my environment.
I supposed to have different code since if I look at the commit in this thread and files on my disk they are different.
Daily.sh says I have the latest code though.

LoZio commented Mar 14, 2018

I read that doc and I'm experimenting with all the parameters to find the better setup for my environment.
I supposed to have different code since if I look at the commit in this thread and files on my disk they are different.
Daily.sh says I have the latest code though.

@murrant

This comment has been minimized.

Show comment
Hide comment
@murrant

murrant Mar 14, 2018

Member

@LoZio code changes over time. There has been improvements/bugfixes since then.
If ./validate.php says you are all good, you are up to date.

Make sure to pay attention to the per-port polling section of the performance docs that may help you.

Member

murrant commented Mar 14, 2018

@LoZio code changes over time. There has been improvements/bugfixes since then.
If ./validate.php says you are all good, you are up to date.

Make sure to pay attention to the per-port polling section of the performance docs that may help you.

@librenms librenms locked as off topic and limited conversation to collaborators Mar 14, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.