RediSearch / RSCoordinator

RediSearch coordinator
Other
23 stars 10 forks source link

[PERF] 64% of RSCoordinator FT.SEARCH command time is associated with _FT.SEARCH command send to shards + receive and reply parsing #304

Open filipecosta90 opened 3 years ago

filipecosta90 commented 3 years ago

Sharing the main and background thread flame charts with the #303 already solved so we focus on the new real hotspots. The first thing to notice is that the coordinator thread is the first bottleneck ( reaching 100% CPU usage faster than the main thread ).

test setup

Considering a 25 shards setup we see:

tracing the network + parsing ( hiredis )

@usecs_rediscmds_detailed: 
[261, 271)          4851 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@   |
[271, 281)          5109 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|
[281, 291)           310 |@@@                                                 |
[291, 301)           281 |@@                                                  |
[301, 311)           135 |@                                                   |
[311, 321)           221 |@@                                                  |
[321, 331)           232 |@@                                                  |
[331, 341)            99 |@                                                   |
[341, 351)            30 |                                                    |
[351, 361)            10 |                                                    |
[361, 371)             6 |                                                    |