Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[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 this issue Oct 21, 2021 · 0 comments
Labels

Comments

@filipecosta90
Copy link
Collaborator

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:

  • Each individual shard reply to RSCoordinator ( _FT.SEARCH ) takes around 55 micros
  • The total time for FT.SEARCH is 420 micros
  • If we trace the time in which we send the individual _FT.SEARCH requests until we parse them we see it represents 64% of the wall clock time (270 micros out of total 420 micros ( FT.SEARCH)). Meaning 64% of wall clock time is on this block of reply sending + receiving shard replies + parsing. Meaning this is the part that we should target to optimize

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 |                                                    |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant