Skip to content

High CPU load for idle connection #34

Description

@rgaufman

Hi there,

I have this code:

require 'paho-mqtt'
client = PahoMqtt::Client.new(username: 'testuser', password: 'testpass', persist: true)
client.connect('127.0.0.1', 1884)
loop { sleep 60 }

Checking top, it starts out taking 10% CPU, after some seconds it drops to 6.4% and then some seconds after that it drops to 5.9% and several minutes later down to 5.7% cpu and stays there.

This is a 2.3ghz Xeon and to put that into perspective, the Rails process takes 5.6% processing several requests a second.

Any ideas what is causing the quite high CPU on an idle connection?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions