-
Notifications
You must be signed in to change notification settings - Fork 629
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
ISPN-6225 Allow the ratio segments/shard to be configurable for the AffinityIndexManager #4576
Conversation
@Sanne After rebasing unfortunately the changes on master are causing the perf tests to deadlock, I am investigating atm. |
80ef41d
to
2ae0fd9
Compare
Rebased. Updated the benchmark numbers after increasing the OOB pool size and reduced the max number of threads per node (from 80 to 50) to avoid deadlocking. |
@Sanne, more numbers, this time using REPL caches for the cache index trio (lock, metadata, data): REPL Caches for Index instead of DISTSync Indexing Mode
Async Indexing Mode
As expected, query latency is lower than the previous benchmarks, but still, latency increases (linearly?) with the number of shards. |
Very interesting, thanks. From my part, I had made good progress on https://hibernate.atlassian.net/browse/HSEARCH-402 : I think the implementation is mostly drafted out, but I couldn't test nor benchmark it yet. If you want to have a look: I wouldn't use it yet, for all I know it might NPE on initialization ;) |
@Sanne, last but not least, here are the numbers for the most query friendly scenario possible, REPL index caches with no writes happening: Query only, REPL Caches for Index instead of DISTSync Indexing Mode
As expected, query latency is even lower than the other benchmarks, but still the number of shards causes considerable extra latency. |
@Sanne More tables with numbers. Same conditions as the very first benchmark (R+W REPL_DIST), but using Query + Writes, DIST caches, async readerSync Indexing Mode, InfinispanIndexManager
Sync Indexing Mode, AffinityIndexManager
The numbers show query latency reduced a lot (about 10x)! OTOH, there still a couple of orders of magnitude gap between using < 4 shards and 256. |
2ae0fd9
to
8c8f5e4
Compare
Why is the put/s metric inversely proportional to the number of shards? I realize that this is not the Affinity IndexManager but I didn't expect |
| Why is the put/s metric inversely proportional to the number of shards? Those numbers are for sync indexing, so I suppose the more shards, the less batching and thus more expensive commits. | I realize that this is not the Affinity IndexManager Sorry, your reply got garbled. Exactly what is not the Affinity IndexManager? |
@Sanne Ops, the tables were both titled |
8c8f5e4
to
148c8d0
Compare
485aa3e
to
640ec59
Compare
640ec59
to
5d93cf9
Compare
Rebased |
Needs rebasing again. @gustavonalle do you need further feedback from @Sanne or anyone else? |
5d93cf9
to
9b785a2
Compare
Actually the query testsuite on master is not stable...Better to wait before integrating this |
Still needs rebasing, and testsuite not stable enough.... Beta2 goes out later today... is this still planned for beta2? |
…ffinityIndexManager
@galderz Let me rebase it and re-run the perf tests |
9b785a2
to
404ed4a
Compare
@galderz Not going to Beta2, there is a deadlock when running stress tests https://issues.jboss.org/browse/ISPN-7381, that is also on master |
Needs rebasing. Thx for the update @gustavonalle. Closing until ISPN-7381 has been fixed. I'll add a note in the JIRA to reopen this PR when that's fixed. |
@gustavonalle Why reopen? |
Needs rebasing too. |
I had it rebased 1h ago, need do it again |
@galderz Why close? It can be reviewed and I'd like to have CI feedback on this. The deadlock is on master as well, I'm still investigating.... |
Because we won't be able to integrate it until ISPN-7381 has been fixed. Keeping it open is taking CI resources from other more top priority things. Once ISPN-7381 is open we can refocus on this. |
@galderz ok, was not aware it was because of the CI, closing for now... |
https://issues.jboss.org/browse/ISPN-6225
Marking as preview, since it has a few dependencies:
Summary of changes
AffinityIndexManager (AIM) supports the shard configuration from Hibernate Search, example:
props.put("default.sharding_strategy.nbr_of_shards", "10");
If specified, will split the index into a fixed number of shards, otherwise will assume
number of shards = number of segments (like it's on master).
Implications
On master, the number of shards is always equals to the number of segments; the proposed configuration above does not require to reduce the number of segments in order to have less shards. When configured with the number of shards, the AIM will not have strictly all the affinity characteristics described in https://github.com/infinispan/infinispan/wiki/Index-affinity-proposal but will behave similarly to the InfinispanIndexManager, except that it's not constrained to have a single index with a single node handling all the indexing cluster wide.
Benchmark
Numbers from AffinityPerfTest (all nodes same JVM) with:
Sync Indexing Mode
Async Indexing Mode
As a comparison, numbers for the InfinispanIndexManager:
Sync Indexing Mode
Async Indexing Mode