Skip to content

Rework server connection scheduler #2647

@EvgeniiMekhanik

Description

@EvgeniiMekhanik

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:

  1. Simple way - break this loop if ci > N.
  2. The best way - remove connections which are not available from scheduler.

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions