Madelyn Olson e74a1f3bd9
Optimize the performance of cluster slots for non-continuous slots (#11745)
This change improves the performance of cluster slots by removing the deferring lengths that are used. Deferring lengths are used in two contexts, the first is for determining the number of replicas that serve a slot (Added in 6.2 as part of a different performance improvement) and the second is for determining the extra networking options for each node (Added in 7.0). For continuous slots, (e.g. 0-8196) this improvement is very negligible, however it becomes more significant when slots are not continuous (e.g. 0 2 4 6 etc) which can happen in production for various users.

The `cluster slots` command is deprecated in favor of `cluster shards`, but since most clients don't support the new command yet I think it's important to not degrade performance here.

Benchmarking shows about 2x improvement, however I wasn't able to get a coherent TPS number since the benchmark process was being saturated long before Redis was, so had to run with multiple benchmarks and merge results. If needed I can add this to our memtier framework. Instead the next section shows the number of usec per call from the benchmark results, which shows significant improvement as well as having a more coherent response in the CoB.

| | New Code | Old Code | % Improvements
|----|----|----- |-----
| Uniform slots| usec_per_call=10.46 | usec_per_call=11.03 | 5.7%
| Worst case (Only even slots)| usec_per_call=963.80 | usec_per_call=2950.99 | 307%

This change also removes some extra white space that I added a when making a code change for adding hostnames.
2023-01-29 18:04:53 -08:00
..
2012-04-13 17:52:33 -07:00
2022-11-23 17:39:08 +02:00
2022-08-22 15:01:40 +08:00
2022-08-22 15:01:40 +08:00
2023-01-11 09:59:24 +01:00
2020-04-24 17:11:21 -07:00
2023-01-11 09:59:24 +01:00
2023-01-11 09:59:24 +01:00
2023-01-11 09:59:24 +01:00
2022-11-09 19:50:07 +02:00
2022-11-09 19:50:07 +02:00
2022-03-09 13:58:23 +02:00
2020-05-05 23:35:08 -04:00
2022-08-23 12:37:56 +03:00
2022-04-17 15:43:22 +03:00
2023-01-11 09:59:24 +01:00
2014-08-08 10:05:32 +02:00
2022-10-02 13:56:45 +03:00
2023-01-11 09:59:24 +01:00
2022-08-23 12:37:56 +03:00
2021-07-10 10:04:54 -05:00
2014-07-02 16:31:22 +02:00
2022-07-18 10:56:26 +03:00
2023-01-22 16:32:20 +02:00