A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/confluentinc/librdkafka/issues/4684 below:

Increased CPU usage caused by a loop lasting 1ms max · Issue #4684 · confluentinc/librdkafka · GitHub

Description

When the main thread loop is awakened less than 1 ms before the expiration of a timeout, it is serving with a zero timeout, leading to increased CPU usage until the timeout is reached

How to reproduce

Put a debug log in some of the functions that are called in main loop, like rd_kafka_cgrp_serve logging the time difference with the first timer being checked. You'll notice that when it's awakened less than a millisecond before the timer, like 1-999 microseconds before, the conversion to milliseconds gives 0, so it's serving with a 0 timeout in a loop until it's reached.

Checklist

Please provide the following information:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4