MXS-1948: Do round-robin worker assignment
Due to the skewed accept distribution without SO_REUSEPORT, we use round-robin assignment of workers for new client connections. This provides better performance as work is more likely to be evenly distributed across all threads. Using a least-busy-worker algorithm would provide a more stable result but this is not trivially simple to implement. For this reason, the round-robin based approach was chosen for 2.2.
This commit is contained in:
@ -495,6 +495,13 @@ public:
|
||||
*/
|
||||
static void set_maxwait(unsigned int maxwait);
|
||||
|
||||
/**
|
||||
* Get next Worker's ID
|
||||
*
|
||||
* @return The ID of the worker where work should be assigned
|
||||
*/
|
||||
static int pick_worker_id();
|
||||
|
||||
private:
|
||||
Worker(int id,
|
||||
int epoll_fd);
|
||||
|
||||
Reference in New Issue
Block a user