Tuesday, August 11, 2020

Wikipedia: Thundering herd problem

 Here is the article. 

In computer science, the thundering herd problem occurs when a large number of processes or threads waiting for an event are awoken when that event occurs, but only one process is able to handle the event. When the processes wake up, they will each try to handle the event, but only one will win. All processes will compete for resources, possibly freezing the computer, until the herd is calmed down again.[1]

Mitigation[edit]

The Linux-kernel will serialize responses for requests to a single file descriptor, so only one thread (process) is woken up.[2]

Similarly in Microsoft Windows, I/O completion ports can mitigate the thundering herd problem, as they can be configured such that only one of the threads waiting on the completion port is woken up when an event occurs.[3]

In systems which rely on a backoff mechanism (e.g. exponential backoff), the clients will retry failed calls, by waiting a specific amount of time between consecutive retries. In order to avoid the thundering herd problem, jitter can be purposefully introduced, in order to break the synchronization across the clients thereby avoiding collisions. In this approach, randomness is added to the wait intervals between retries, so that clients are no longer synchronized.


Actionable Items

I  tried to understand Facebook TAO data store, and thundering herd problem is one of important concepts for me to learn in order to understand the requirements. 





No comments:

Post a Comment