Motivation
In ratio scheduler we iterate over all connections in __sched_srv in the loop for (ci = 0; ci < srvdesc->conn_n; ++ci) until we will find suitable connection. If connection is not found return NULL. In case when count of connections is big (we allow to have up to 65535 connections for server) and connections are not established/dropped this loop became very ineffective. I catch softlockup under heavy load in this loop several timers, when count of servers is also big. There are two suggestions how to fix it:
- Simple way - break this loop if ci > N.
- The best way - remove connections which are not available from scheduler.
Motivation
In ratio scheduler we iterate over all connections in
__sched_srvin the loopfor (ci = 0; ci < srvdesc->conn_n; ++ci)until we will find suitable connection. If connection is not found return NULL. In case when count of connections is big (we allow to have up to 65535 connections for server) and connections are not established/dropped this loop became very ineffective. I catch softlockup under heavy load in this loop several timers, when count of servers is also big. There are two suggestions how to fix it: