-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add selected_message_queues
flag to filter message queues and improve performances
#12808
Conversation
The |
The |
The |
@@ -287,5 +291,7 @@ def query_map(config: InstanceConfig): | |||
"job_memory_usage": get_job_memory_usage(config.job_query_timeout), | |||
"memory_info": get_memory_info(config.query_timeout), | |||
"job_queue": get_job_queue_info(config.query_timeout), | |||
"message_queue_info": get_message_queue_info(config.system_mq_query_timeout, config.severity_threshold), | |||
"message_queue_info": get_message_queue_info( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some tests for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right ! I just finished adding them ! PTAL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation looks great, just one question about the configuration structure
The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just 1 non-blocking comment!
…ve performances (#12808) Add selected_message_queues flag + tests
What does this PR do?
This PR adds a
selected_message_queues
flag to allow watching only a specific list of message queues and improve performances.Motivation
(Customer request)
Sometimes you just want to monitor messages on specific IBM i system message queues. The thing is that the way it's implemented now, the request is being made on all
MESSAGE_QUEUE_NAME
instead of first filtering by interestingMESSAGE_QUEUE_NAME
and after that get the message queue info we want. We suspect the absence of filter to be responsible for the high CPU usage on IBM i hosts so we need to fix that.Benchmark
To check that the feature really improved the performance I ran some performance tests:
We will be monitoring the QSYSOPR message queue and CECUSER (the user) message queue (those names are not important, we just want to have 2 different message queues). We will create messages in the
CECUSER
message queue and measure the query execution time on bothQSYSOPR
,CECUSER
, without filter. We will be satisfied if the time forQSYSOPR
remains nearly constant,QSYSOPR
increases and the without filter increases tooThe query is
And the
message_queues_filter
will take the value:WHERE MESSAGE_QUEUE_NAME IN ('QSYSOPR')
for the QSYSOPR query.WHERE MESSAGE_QUEUE_NAME IN ('CECUSER')
for the CECUSER query.Now that we're all on the same page, here are the time results about the query:
(Tests ran on IBM i 7.4 PowerVM POWER9 LPAR 1 vCPU 2048 Mo RAM)
So our expectations finally realise as we see the QSYSOPR query time being constant compared to the other two queries. This means less load on the CPU for the filtered query, mission completed !
Additional Notes - Scripts for reproducibility
IBM i is not a Unix-like OS, so I think it's important to detail the scripts used, both for rigor and for reproducibility purposes.
To create the jobs on the VM the following command was used:
To measure the time taken during a query the following command was used:
Review checklist (to be filled by reviewers)
changelog/
andintegration/
labels attached