Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

speed up check_rabbitmq_objects: reduce amount of metadata requested#98

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
kjetilho wants to merge1 commit intonagios-plugins-rabbitmq:master
base:master
Choose a base branch
Loading
fromkjetilho:master

Conversation

@kjetilho
Copy link

Parsing big JSON documents can take a long time, and we only want
the number of objects. "name" is a valid attribute for all
endpoints except bindings, so we ask for "vhost" instead for that case.

On our OpenStack using RabbitMQ, CPU time for this check was reduced
from 52 seconds to 2 seconds.

Parsing big JSON documents can take a long time, and we only wantthe number of objects.  "name" is a valid attribute for allendpoints except bindings, so we ask for "vhost" instead for that case.On our OpenStack using RabbitMQ, CPU time for this check was reducedfrom 52 seconds to 2 seconds.
@kjetilhokjetilho changed the titlecheck_rabbitmq_objects: reduce amount of metadata requestedspeed up check_rabbitmq_objects: reduce amount of metadata requestedSep 2, 2019
@kjetilho
Copy link
Author

Here are two runs with added instrumentation - the first is the original code. Notice how most time is spent after body was fetched ("is done" is emitted at end of for-loop).

19:58:53  fetch https://rmq:15671/api/vhosts19:58:53  body length: 97119:58:53  vhost is done19:58:53  fetch https://rmq:15671/api/exchanges19:58:53  body length: 24777719:58:54  exchange is done19:58:54  fetch https://rmq:15671/api/bindings19:58:54  body length: 179077819:58:56  binding is done19:58:56  fetch https://rmq:15671/api/queues19:58:58  body length: 477802819:59:34  queue is done19:59:34  fetch https://rmq:15671/api/channels19:59:35  body length: 293137919:59:48  channel is doneRABBITMQ_OBJECTS OK - Gathered Object Counts | vhost=0;; exchange=530;; binding=6176;; queue=3074;; channel=2732;;

And with restricted columns:

20:00:03  fetch https://rmq:15671/api/vhosts?columns=name20:00:03  body length: 1420:00:03  vhost is done20:00:03  fetch https://rmq:15671/api/exchanges?columns=name20:00:03  body length: 2573320:00:03  exchange is done20:00:03  fetch https://rmq:15671/api/bindings?columns=vhost20:00:03  body length: 8647920:00:04  binding is done20:00:04  fetch https://rmq:15671/api/queues?columns=name20:00:04  body length: 21586620:00:05  queue is done20:00:05  fetch https://rmq:15671/api/channels?columns=name20:00:05  body length: 16221820:00:05  channel is doneRABBITMQ_OBJECTS OK - Gathered Object Counts | vhost=0;; exchange=530;; binding=6176;; queue=3074;; channel=2731;;

@kjetilho
Copy link
Author

I wonder if the Travis CI has been fixed and I could retry the job?

I see from the logs that the previous successful test was done in 2017 on a worker running Ubuntu Trusty with RabbitMQ Version 3.6.14

The run above was done on an Ubuntu Xenial worker without RabbitMQ installed.

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@kjetilho

[8]ページ先頭

©2009-2025 Movatter.jp