Skip to content

Jbtm 4039#207

Merged
mmusgrov merged 1 commit into
jbosstm:mainfrom
mmusgrov:JBTM-4039
May 12, 2026
Merged

Jbtm 4039#207
mmusgrov merged 1 commit into
jbosstm:mainfrom
mmusgrov:JBTM-4039

Conversation

@mmusgrov

@mmusgrov mmusgrov commented May 10, 2026

Copy link
Copy Markdown
Member

https://redhat.atlassian.net/browse/JBTM-4039

The fix for the SlotStore performance failure with 1600 threads is i) to set the number of slots to be large enough to handle the number of benchmark threads creating transactions and ii) to also clean the stores before running each benchmark.

@mmusgrov

mmusgrov commented May 10, 2026

Copy link
Copy Markdown
Member Author

Correction: in the description I said

> -i flag: reduce the number of measurement iterations to do from 30 s to 15 s (the JMH default is 10 seconds)

but should have said:

> -i flag: reduce number of measurement iterations to do from 5 to 3

The diff is:
JMHARGS="-t $i -r 30 -f 3 -wi 5 -i 5 -foe true "
vs
JMHARGS="-t $i -r 15 -f 2 -wi 2 -i 3 -foe true "

The meaning of the flags is reported by running java -jar ./ArjunaJTA/jta/target/benchmarks.jar -help

And I also changed the order of runs (so that the one most likely to fail, 1600, runs first) and I skipped the run with 240 threads. The diff is:
THREAD_COUNTS="1 24 240 1600"
vs
THREAD_COUNTS="1600 24 1"

[EDIT] I removed changes to the run parameters as request by the reviewers.

@mmusgrov mmusgrov requested review from jmfinelli and marcosgopen May 11, 2026 07:59
Comment thread .github/scripts/bm.sh Outdated
// set the slot size, making sure it's a sensible multiple
int threadCount = getThreadCountFromProperties(THREADS);
configBean.setNumberOfSlots(roundUp(256, threadCount));
configBean.setBackingSlotsClassName(DiskSlots.class.getName());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I suppose that InfinispanSlots is the BackingSlotsClassName to test, isn't it?

Comment on lines +98 to +105
try {
// clean up the storage otherwise it may interfere with the next run
if (!purgeFiles(Paths.get(STORE_DIR).toFile())) {
System.err.printf("problem removing slot store file storage (%s)%n", STORE_DIR);
}
} catch (Exception e) {
System.err.printf("Warn: problem cleaning the object store (%s): %s%n", STORE_DIR, e.getMessage());
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cannot this code be replaced with an invocation to cleanStore?

Comment on lines +92 to +99
try {
// clean up the storage otherwise it may interfere with the next run
if (!purgeFiles(Paths.get(storeDir).toFile())) {
System.err.printf("problem removing slot store file storage (%s)%n", storeDir);
}
} catch (Exception e) {
System.err.printf("Warn: problem cleaning the object store (%s): %s%n", storeDir, e.getMessage());
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cannot this code be replaced with an invocation to cleanStore?

Comment on lines +47 to +54
try {
// clean up the storage otherwise it may interfere with the next run
if (!purgeFiles(Paths.get(storeDir).toFile())) {
System.err.printf("problem removing slot store file storage (%s)%n", storeDir);
}
} catch (Exception e) {
System.err.printf("Warn: problem cleaning the object store (%s): %s%n", storeDir, e.getMessage());
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cannot this code be replaced with an invocation to cleanStore?

// Sometimes it is useful to run the benchmark directly from an IDE:
Options opt = new OptionsBuilder()
.include(InfinispanSlotsStoreBenchmark.class.getSimpleName() + ".testWriteThroughCache")
.include(BM_CLASS_NAME + ".testWriteThroughCache")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be testInfinispanStore?

int threadCount = defaultThreadCount;
String jmhArgs = System.getenv(JMHARGS_ENV);

if (jmhArgs !=null) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry...nitpicking:

Suggested change
if (jmhArgs !=null) {
if (jmhArgs != null) {

@mmusgrov mmusgrov force-pushed the JBTM-4039 branch 2 times, most recently from 28f11c4 to 9001bab Compare May 11, 2026 15:21
@mmusgrov

Copy link
Copy Markdown
Member Author

Thanks for the review, some good catches. I'll wait for the test runs to complete, might be tomorrow now, before merging.

@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.

LGTM, thanks @mmusgrov !

@mmusgrov mmusgrov merged commit 893751d into jbosstm:main May 12, 2026
8 checks passed
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