Details

    • Improvement
    • Resolution: Fixed
    • Major
    • None
    • Professional Edition
    • Poller
    • r6968

    Description

      Attached patch enforces the quiet (-q) option for the poller.

      Rationale:
      With the help of Xdebug and Webgrind, I found that the poller was spending a ton of time colorizing strings for the CLI. The first problem was that the poller-wrapper was not running the poller in quiet mode and was simply redirecting all output to /dev/null. The second problem was the the poller was ignoring the quiet option.

      I define a global OBS_QUIET similar to OBS_DEBUG and simply short-circuit the print_* functions.

      Attachments

        Activity

          [OBS-1439] Quiet the Poller

          Yup, by a fair bit. Its especially bad with large tables as the code tries to size the columns!

          adama Adam Armstrong added a comment - Yup, by a fair bit. Its especially bad with large tables as the code tries to size the columns!

          Adam, I didn't have your table-suppression code in my tree while I was testing. Looking at the call graph, print_cli_table was the function that was causing the issue. So, you probably already the root cause resolved in your tree. That may be why you didn't see any change. Did the table-suppression changes improve CPU usage on your server?

          moorereason Cameron Moore added a comment - Adam, I didn't have your table-suppression code in my tree while I was testing. Looking at the call graph, print_cli_table was the function that was causing the issue. So, you probably already the root cause resolved in your tree. That may be why you didn't see any change. Did the table-suppression changes improve CPU usage on your server?

          Committed in r6969.

          adama Adam Armstrong added a comment - Committed in r6969.

          I suppose we'll see if anyone else gets a larger improvement!

          adama Adam Armstrong added a comment - I suppose we'll see if anyone else gets a larger improvement!

          http://alpha.memetic.org/~adama/snaps/Observium_Dev_-_Google_Chrome_2015-09-08_10.58.41.png

          This is my development system. Almost zero change! Very strange!

          adama Adam Armstrong added a comment - http://alpha.memetic.org/~adama/snaps/Observium_Dev_-_Google_Chrome_2015-09-08_10.58.41.png This is my development system. Almost zero change! Very strange!
          moorereason Cameron Moore added a comment - - edited

          Before and after graphs attached.

          moorereason Cameron Moore added a comment - - edited Before and after graphs attached.

          It's strange. I'd expect if a percentage of the CPU time was being used by something on one system, it'd be a similar percentage on another.

          Can you show me the various CPU graphs for your Observium server?

          adama Adam Armstrong added a comment - It's strange. I'd expect if a percentage of the CPU time was being used by something on one system, it'd be a similar percentage on another. Can you show me the various CPU graphs for your Observium server?

          I'm running Obs on an old 32-bit server with an old OS: CentOS 6 with PHP 5.3 (yes, I know...not supported). Small improvements for you can be very noticeable for me.

          I think the problems started about the time you put the new CLI code into place, but that's just a hunch from my memory of following the commit RSS feed. I double-checked my tree to make sure I sent you all the applicable changes.

          moorereason Cameron Moore added a comment - I'm running Obs on an old 32-bit server with an old OS: CentOS 6 with PHP 5.3 (yes, I know...not supported). Small improvements for you can be very noticeable for me. I think the problems started about the time you put the new CLI code into place, but that's just a hunch from my memory of following the commit RSS feed. I double-checked my tree to make sure I sent you all the applicable changes.

          Hmm. I seem to see almost no difference from this. I'll let it run a while longer and see.

          adama Adam Armstrong added a comment - Hmm. I seem to see almost no difference from this. I'll let it run a while longer and see.

          holy shit. I thought it might help, but I never thought it would be so bad!

          I'll take a look at this when I get back home!

          adama Adam Armstrong added a comment - holy shit. I thought it might help, but I never thought it would be so bad! I'll take a look at this when I get back home!

          People

            landy Mike Stupalov
            moorereason Cameron Moore
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: