Search code examples
sphinx

How many agents we can use for distributed index in Sphinx?


We use distributed index:

index ind_mm {
    type = distributed
    agent = 192.168.0.11:9318:ind_1
    agent = 192.168.0.11:9319:ind_2
    agent = 192.168.0.22:9317:ind_3
    agent = 192.168.0.22:9317:ind_4
}

Are any limitations on count of agents? When the overhead well be too high? If we will use about 100 agnets, will be good performance? 1000 angetns?


Solution

  • Well there probably isnt much point having more agents that CPU cores have on the machine.

    If have more agents, they pretty much guaranteed to queue up on cores. Ie the queries wont actually run in parallel. (well they might, due to process switching)

    There is no guarantee that having events equal number to number of cores, will mean one part per core (its upto the OS to distribute processes to cores) - but in theory it COULD be.

    The instance running the distributed index, will use a core, so in an ideal situation have one less agent than cores.