Skip to content

JBTM-845 Include the Infinispan backed slot store in the object store…#204

Merged
mmusgrov merged 5 commits into
jbosstm:mainfrom
mmusgrov:JBTM-845
May 4, 2026
Merged

JBTM-845 Include the Infinispan backed slot store in the object store…#204
mmusgrov merged 5 commits into
jbosstm:mainfrom
mmusgrov:JBTM-845

Conversation

@mmusgrov

@mmusgrov mmusgrov commented Apr 24, 2026

Copy link
Copy Markdown
Member

NARAYANA_REPO=mmusgrov
NARAYANA_BRANCH=JBTM-845
NY_BRANCH=JBTM-845
THREAD_COUNTS=1 24 240

github seems unable to support 1600 threads

@marcosgopen

marcosgopen commented Apr 27, 2026

Copy link
Copy Markdown
Member

@mmusgrov the job is failing because the expected number or store benchmark is now 6 instead of 4:
we should update line

BM5="ArjunaJTA/jta com.arjuna.ats.jta.xa.performance.*StoreBenchmark.* 4"

I think this check is quite counterintuitive but to change 4 to 6 is the fastest fix.

P.S. InfinispanSlotsStoreRestartBenchmark is not executed by the script because it ends with '*StoreRestartBenchmark' instead of '*StoreBenchmark'. If you want to include that too maybe the configuration number i mentioned above needs to be changed to 7.

@mmusgrov
mmusgrov force-pushed the JBTM-845 branch 3 times, most recently from 48e385f to bb9bdb5 Compare April 27, 2026 14:10
@mmusgrov

Copy link
Copy Markdown
Member Author

@mmusgrov the job is failing because the expected number or store benchmark is now 6 instead of 4: we should update line

BM5="ArjunaJTA/jta com.arjuna.ats.jta.xa.performance.*StoreBenchmark.* 4"

I think this check is quite counterintuitive but to change 4 to 6 is the fastest fix.

P.S. InfinispanSlotsStoreRestartBenchmark is not executed by the script because it ends with '*StoreRestartBenchmark' instead of '*StoreBenchmark'. If you want to include that too maybe the configuration number i mentioned above needs to be changed to 7.

Well spotted. I went for 6 since InfinispanSlotsStoreBase is a base class for the others.

I agree this script is quite/very counterintuitive, I've tripped up over it before in other parts too.

let tc=$(wc -l < ${CSVF})
let tc=tc-1 # subtract 1 to account for the header
if [ $tc != $3 ]; then
if [ $tc -lt $3 ]; then

@mmusgrov mmusgrov Apr 28, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it to less than the expected number since that still implies at least one benchmark failed to finish

@mmusgrov mmusgrov Apr 28, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is another example of how non-intuitive/difficult to parse the script is. I ran it on my laptop and got:

Some benchmark tests did not finish. Expected: 4 Actual: 7

As you [Marco] mentioned elsewhere the pattern for the store benchmarks:

BM5="ArjunaJTA/jta com.arjuna.ats.jta.xa.performance.*StoreBenchmark.* 6"

had been incorrect but I couldn't figure out where the value 7 came from, lol!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We used to have 4 store benchmarks, This PR is adding 3 InfiniSpan benchmarks. I think this is it.

I think BM5="ArjunaJTA/jta com.arjuna.ats.jta.xa.performance.StoreBenchmark. 7" should work, but I haven't checked.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah you are correct, I forgot that I also added DiskSlotsStoreBenchmark.
I put the value as 6 since I have removed the InfinispanSlotsRestartStoreBenchmark.

@marcosgopen

Copy link
Copy Markdown
Member

I can see an interesting error in the infinispan restart benchmark: "Suppressed: org.infinispan.persistence.spi.PersistenceException: ISPN029025: Failed acquiring lock 'FileSystemLock{directory=null/infinispan-caches/node1/data/objectStoreCluster, file=objectStoreCluster.lck}' for SIFS"

@mmusgrov

Copy link
Copy Markdown
Member Author

I can see an interesting error in the infinispan restart benchmark: "Suppressed: org.infinispan.persistence.spi.PersistenceException: ISPN029025: Failed acquiring lock 'FileSystemLock{directory=null/infinispan-caches/node1/data/objectStoreCluster, file=objectStoreCluster.lck}' for SIFS"

I've seen that one before, I'll investigate. I'll also modify the benchmark to see if we can fail it early (it's been running for 3 hrs.

@mmusgrov

mmusgrov commented Apr 29, 2026

Copy link
Copy Markdown
Member Author

I also noticed many overlapping classes in the uber jar used for the benchmarking such as

arjunacore-7.3.4.Final-SNAPSHOT.jar define 546 overlapping classes

and also

Discovered module-info.class. Shading will break its strong encapsulation

Not necessarily introduced in this PR but I'll investigate those too.

@marcosgopen

Copy link
Copy Markdown
Member

Thanks @mmusgrov

@mmusgrov mmusgrov added the Hold label Apr 30, 2026
@mmusgrov

Copy link
Copy Markdown
Member Author

I've put this on Hold while I investigate "ARJUNA016053: Could not commit transaction".

@mmusgrov

Copy link
Copy Markdown
Member Author

I've put this on Hold while I investigate "ARJUNA016053: Could not commit transaction".

The failures were caused by the run that used 1600 threads which we know fails on when running on the github infrastructure (see pull/205). I fixed it by removing the run with that many threads, ie I set the env var in the PR description:

THREAD_COUNTS=1 24 240

@mmusgrov

Copy link
Copy Markdown
Member Author

I can see an interesting error in the infinispan restart benchmark: "Suppressed: org.infinispan.persistence.spi.PersistenceException: ISPN029025: Failed acquiring lock 'FileSystemLock{directory=null/infinispan-caches/node1/data/objectStoreCluster, file=objectStoreCluster.lck}' for SIFS"

The benchmark that produces that error is InfinispanSlotsRestartStoreBenchmark (which I based on the test InfinispanSlotsRestartStoreBenchmark from the main narayana repo) and it uses write through caching backed by the filesystem and it stops and restarts an infinispan store. So when different JMH benchmark threads try to start stores backed by the same file system location it can find the lock held, ie I don't think that testing the performance of restarts, using JMH, is particularly good benchmark so I have deleted that particular benchmark.

@mmusgrov mmusgrov removed the Hold label Apr 30, 2026

@marcosgopen marcosgopen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mmusgrov

@mmusgrov
mmusgrov merged commit 1e75aa2 into jbosstm:main May 4, 2026
4 of 6 checks passed
@jmfinelli

Copy link
Copy Markdown
Contributor

It looks like the DiskSlotsStoreBenchmark is failing at 1600 threads even in my local environment. This suggests the issue is likely independent of the GitHub infrastructure.

cc @mmusgrov, @marcosgopen

@marcosgopen

Copy link
Copy Markdown
Member

It looks like the DiskSlotsStoreBenchmark is failing at 1600 threads even in my local environment. This suggests the issue is likely independent of the GitHub infrastructure.

cc @mmusgrov, @marcosgopen

Well spotted @jmfinelli . The SlotStore has a numberOfSlots configuration that must be configured correctly and the default configuration should be changed when running with 1600 threads. e.g. "configBean.setNumberOfSlots(1600);" Plus the disk read/write speed highly influences the results. May I suggest to disable this benchmark in the CI testing as with 1600 threads is quite unstable and keep it for reference? WDYT @mmusgrov ?

@marcosgopen

Copy link
Copy Markdown
Member

If we want to keep the DiskSlotsStoreBenchmark to test the logic behind it (not the real scenario performance) we could configure it to run in memory so that we don't hit the disk bottleneck: i.e.

JTAStoreBase.setup(SlotStoreAdaptor.class.getName());
        SlotStoreEnvironmentBean configBean = BeanPopulator.getDefaultInstance(SlotStoreEnvironmentBean.class);

        configBean.setBackingSlotsClassName(DiskSlots.class.getName());
        configBean.setNumberOfSlots(2000); // tested with 1800 threads
        configBean.setStoreDir("/tmp/SlotStore"); // in memory, no disk

@mmusgrov

mmusgrov commented May 6, 2026

Copy link
Copy Markdown
Member Author

It looks like the DiskSlotsStoreBenchmark is failing at 1600 threads even in my local environment. This suggests the issue is likely independent of the GitHub infrastructure.
cc @mmusgrov, @marcosgopen

Well spotted @jmfinelli . The SlotStore has a numberOfSlots configuration that must be configured correctly and the default configuration should be changed when running with 1600 threads. e.g. "configBean.setNumberOfSlots(1600);" Plus the disk read/write speed highly influences the results. May I suggest to disable this benchmark in the CI testing as with 1600 threads is quite unstable and keep it for reference? WDYT @mmusgrov ?

The point of including it was to compare with the Infinispan Slot store and the other store types, not to test the absolute throughput. Depending upon what failures you saw @jmfinelli I would suggest either reducing the number of threads or tuning the number of slots since there are restrictions on that: https://github.com/jbosstm/narayana/blob/7.3.3.Final/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/slot/SlotStoreEnvironmentBean.java#L44

@jmfinelli

Copy link
Copy Markdown
Contributor

Basically, it fails straight after it starts. The output of my local testing is similar to what happened here, even though I only tested 1600 threads and DiskSlotsStoreBenchmark

@jmfinelli

jmfinelli commented May 6, 2026

Copy link
Copy Markdown
Contributor

Yep, configBean.setNumberOfSlots(2000) fixes the issue (at least locally). Thanks @marcosgopen and @mmusgrov

@jmfinelli

Copy link
Copy Markdown
Contributor

@mmusgrov Since you’re the author of the Infinispan store, you probably have the best context to fix this bug. Would you like to open the PR, or should I handle it? Just let me know what works best for you!

@mmusgrov

mmusgrov commented May 6, 2026

Copy link
Copy Markdown
Member Author

@mmusgrov Since you’re the author of the Infinispan store, you probably have the best context to fix this bug. Would you like to open the PR, or should I handle it? Just let me know what works best for you!

I'll fix it since there may be other issues.

@mmusgrov

mmusgrov commented May 8, 2026

Copy link
Copy Markdown
Member Author

@jmfinelli I will push a fix later today in readiness for the weekend runs.

@jmfinelli

Copy link
Copy Markdown
Contributor

@jmfinelli I will push a fix later today in readiness for the weekend runs.

Sure, no problem at all. Narayana has been already released so nu rush at all. I'm completing the last steps before sending the announcement. Thanks Mike

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants