Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seems to use a lot of CPU #33

Closed
aspiers opened this issue Apr 1, 2018 · 10 comments · Fixed by #96
Closed

seems to use a lot of CPU #33

aspiers opened this issue Apr 1, 2018 · 10 comments · Fixed by #96

Comments

@aspiers
Copy link

aspiers commented Apr 1, 2018

When monitoring vaping with htop, I see it spiking to between 60% and 90% of one CPU pretty much all the time. That sounds wrong for something which is just doing a bit of pinging. I upgraded to 0.5.0 but it didn't help. Any ideas how best to debug this?

@vegu
Copy link
Contributor

vegu commented Apr 2, 2018

Odd, when i run it with the example config from the documentation it's pretty much idle most of the time.

Can you paste your config?

@vegu
Copy link
Contributor

vegu commented Apr 2, 2018

Also how many users viewing the web ui?

@aspiers
Copy link
Author

aspiers commented Apr 7, 2018

It's just me using it, with only one web page viewing the UI.


probes:
  - name: latency
    type: std_fping
    output:
      - vodka

    <a group>:
      hosts:
        - host: <a host>
          name: <a host's name>
          color: red
        - host: <a host>
          name: <a host's name>
          color: blue
        - host: <a host>
          name: <a host's name>
          color: orange

    <a group>:
      hosts:
        - host: <a host>
          name: <a host's name>
          color: yellow

    <a group>:
      hosts:
        - host: <a host>
          name: <a host's name>
          color: red
        - host: <a host>
          name: <a host's name>
          color: orange

    <a group>:
      hosts:
        - host: <a host>
          name: <a host's name>
          color: red
#        - host: <a host>
#          name: <a host's name>
#          color: lime
        # - host: <a host>
        #   name: <a host's name>
        #   color: blue
        - host: <a host>
          name: <a host's name>
          color: green
        - host: <a host>
          name: <a host's name>
          color: orange

    <a group>:
      hosts:
        - host: <a host>
          name: <a host's name>
          color: coral
        - host: <a host>
          name: <a host's name>
          color: brown

plugins:
  - name: std_fping
    type: fping
    count: 10
    interval: 3s
    output:
      - vodka

  - name: vodka
    type: vodka
    logging:
      version: 1
      formatters:
        simple:
          format: '%(asctime)s - %(name)s - %(levelname)s: %(message)s'
      handlers:
        console:
          class: logging.StreamHandler
          level: DEBUG
          formatter: simple
          stream: ext://sys.stdout
      loggers:
        vodka:
          level: DEBUG
          handlers:
            - console

    data:
      - type: fping
        handlers:
          - type: index
            index: host
          - type: store
            container: list
            limit: 7200

    apps:
      graphsrv:
        tmpl_engine: jinja2
        enabled: true
        graphs:
          multitarget:
            id_field: host
            type: multitarget
            plot_y: avg
            format_y: ms

          smokestack:
            id_field: host
            type: smokestack
            plot_y: avg

    plugins:

      - name: http
        type: flask
        host: <a host>
        port: 7021
        debug: true
        static_url_path: /static
        server: self
        async: thread
        routes:
          /targets : graphsrv->targets
          /graph_data :
            methods:
              - POST
              - GET
            target: graphsrv->graph_data
          /graph : graphsrv->graph_view
          /overview_read_file : graphsrv->overview_read_file
          /: graphsrv->overview_view

@vegu
Copy link
Contributor

vegu commented Apr 11, 2018

Only thing i see different from your config and mine is the number of hosts so went ahead and upped those to 12 on my end and retested, and it still behaves fine.

Kind of curious what other users are seeing when they run vaping.

What distro / python version are you running ?

Could perhaps do some python profiling to see where it's spending all the time.

@aspiers
Copy link
Author

aspiers commented Apr 11, 2018

Yeah, it's odd. I'm on vacation right now but happy to try any profiling / debugging suggestions you have when I get back. Thanks for the reply!

@grizz
Copy link
Member

grizz commented May 10, 2018

@aspiers any chance to check things out again? We've been testing scaling and can't reproduce any issues.

@aspiers
Copy link
Author

aspiers commented Oct 21, 2018

Sorry, haven't been using this for a while, but I just fired it up again and will keep an eye out for issues. I'm running it with Python 2.7.14 on openSUSE Leap 15.0.

@nefilim
Copy link

nefilim commented Jan 2, 2019

same here, 2 out of 3 seconds it's at > 90% (on modest dual core celeron).

checking fping running by itself produces less than 1% of CPU usage as one would expect...

[root@nexus ~]# uname -a
Linux nexus 3.10.0-862.14.4.el7.x86_64 #1 SMP Wed Sep 26 15:12:11 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@nexus ~]# python --version
Python 2.7.5

@vegu
Copy link
Contributor

vegu commented Jan 31, 2020

noticed it using 99% of cpu when running without --debug, with --debug it's idle most of the time

are you guys running with or without --debug

@nefilim
Copy link

nefilim commented Jan 31, 2020

@vegu I moved on and just created my own: https://github.com/nefilim/pinger

@vegu vegu mentioned this issue Sep 10, 2020
@vegu vegu linked a pull request Sep 10, 2020 that will close this issue
@vegu vegu closed this as completed in #96 Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants