Skip to content

fix: Implement periodic logging of task queue size - #1978

Merged
chejinge merged 3 commits into
OpenAtomFoundation:unstablefrom
Tianpingan:periodic_logging_queue_size
Sep 15, 2023
Merged

fix: Implement periodic logging of task queue size #1978
chejinge merged 3 commits into
OpenAtomFoundation:unstablefrom
Tianpingan:periodic_logging_queue_size

Conversation

@Tianpingan

@Tianpingan Tianpingan commented Sep 12, 2023

Copy link
Copy Markdown
Contributor

This PR implements periodic logging of task queue size.

It will print the current queue size if the thread pool queue size exceeds QUEUE_SIZE_THRESHOLD_PERCENTAGE/100 of the maximum queue size every 5 seconds.

related issue: #1961

Signed-off-by: tianpingan <tianpingan2000@gmail.com>
Signed-off-by: tianpingan <tianpingan2000@gmail.com>
Signed-off-by: tianpingan <tianpingan2000@gmail.com>
Comment thread src/pika_server.cc
size_t max_size = ClientProcessorThreadPoolMaxQueueSize();
size_t thread_hold = (max_size / 100) * QUEUE_SIZE_THRESHOLD_PERCENTAGE;
if (cur_size > thread_hold) {
LOG(INFO) << "The current queue size of the Pika Server's client thread processor thread pool: " << cur_size;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

方便的话辛苦加一下队列输出的时间点,要不不知道跟毛刺啥的对不对的上

@chejinge
chejinge merged commit 0990487 into OpenAtomFoundation:unstable Sep 15, 2023
bigdaronlee163 pushed a commit to bigdaronlee163/pika that referenced this pull request Jun 8, 2024
…n#1978)

* fix: Implement periodic logging of task queue size
cheniujh pushed a commit to cheniujh/pika that referenced this pull request Sep 24, 2024
…n#1978)

* fix: Implement periodic logging of task queue size
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 this pull request may close these issues.

3 participants