MINOR: activity: add accept queue counters for pushed and overflows
It's important to monitor the accept queues to know if some incoming
connections had to be handled by their originating thread due to an
overflow. It's also important to be able to confirm thread fairness.
This patch adds "accq_pushed" to activity reporting, which reports
the number of connections that were successfully pushed into each
thread's queue, and "accq_full", which indicates the number of
connections that couldn't be pushed because the thread's queue was
full.
diff --git a/src/listener.c b/src/listener.c
index 2b8c2df..0d7a1c4 100644
--- a/src/listener.c
+++ b/src/listener.c
@@ -852,13 +852,14 @@
*/
ring = &accept_queue_rings[t1];
if (accept_queue_push_mp(ring, cfd, l, &addr, laddr)) {
+ HA_ATOMIC_ADD(&activity[t1].accq_pushed, 1);
task_wakeup(ring->task, TASK_WOKEN_IO);
continue;
}
/* If the ring is full we do a synchronous accept on
* the local thread here.
- * FIXME: we should update some stats here.
*/
+ HA_ATOMIC_ADD(&activity[t1].accq_full, 1);
}
#endif // USE_THREAD