The rebalance threshold doesn't seem to work the way some people think it does. I'll tell you what works for me. (most the below is just background info). Actual calculation is at the bottom.
From this page:
https://www.logicmonitor.com/support/auto-balanced-collector-groups
Using this formula to determine the new rebalance threshold:
"The number of instances a Collector can handle is determined using the following formula:
Number of instances = (Target_Collector_mem/Medium_mem)^1/2 * Medium_Threshold
For example, if a user sets a threshold for a medium-size (2 GB) Collector to 10,000, for a large-size (4 GB) Collector, the threshold will be scaled to:
14140 instances = (4/2)^1/2*10000"
For the round numbers and two large collectors, the rebalance threshold I calculated is 22274 (note: use your actual numbers instead of the round numbers). I use the above formula, but use all instances across all collectors:
| List the number of instances per collector one row for each collector. This will be used to sum the total instances and sum the total number of collectors. | Enter the target collector JVM Memory (e.g. Medium = 2, Large = 4, Extra Large = 8) | 2 GB (Do not change) | 10000 (Do not change) | Output (this will be the rebalance threshold) |
| Instances | Target Collector Memory | Medium Memory | Medium Threshold | New Rebalance Threshold |
| 40000 | 4 | 2 | 10000 | 22274 |
| 23000 | | | | |
Above is a portion of a spreadsheet I have. It's pretty straightforward. The New Rebalance Threshold field formula should be
=(SUM($A:$A)/(($B$3/$C$3)^0.5))/COUNT($A:$A)
Where column A is each collector instance currently, column B is based on the current size of the collectors, C and D are static, and E should have the formula above.
I probably over-complicated this, but it works for me.
If you try this, let me know if it works for you. I haven't revisited that spreadsheet in a while.
ETA: After posting this, I found this thread which might provide more info (and a couple of different ways to calculate)
https://community.logicmonitor.com/discussions/feature-requests/lm-instance-auto-balance-collector-tool/17389