Details
-
Type:
New Feature
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 3.0.0
-
Fix Version/s: 3.0.0
-
Labels:None
-
Environment:Core i7 2600, Samsung SSD
-
Testcase included:yes
-
Patch Submitted:Yes
-
Number of attachments :3
Description
I found BTM a few weeks ago when I was looking for a replacement for c3p0 (which caused deadlocks) and really like it for it's simplicity and stability. When I saw BTM, I thought that JTA is even better for my Spring/Infinispan/Jpa based app anyway.
All is stable now and fine until I switched from 'NullJournal' to 'DiskJournal'. The TX/s dropped to 1/10 of the values they've been before and I started thinking whether a disk journal should really drop performance so much... luckily BTM allows to create-your-own so I started to create a proof of concept.
Attached is the compiled binary and a patch to the version currently in 'GIT' (actually only the parent pom is changed as the rest is simply a separate module). Built on my machine I got the following figures when running the unit tests:
- DiskJournal: 12850 transactions, took 51,12 seconds (251,39 tx/s)
- NioJournal (w. fsync): 257000 transactions, took 5,51 seconds (46667,88 tx/s)
- NioJournal (w/o. fsync): 257000 transactions, took 1,43 seconds (179344,03 tx/s)
- NullJournal (reference): 257000 transactions, took 0,20 seconds (1266009,85 tx/s)
(Implementation class of the attached JAR is 'bitronix.tm.journal.nio.NioJournal')
What I sent is a first working prototype and should really be considered experimental (license is Apache2 but can be changed to LGPL). Better test coverage and additional log output is pending. However I would appreciate the inclusion of the code and would be happy to continue working on this module if this is OK with you the lead
.
If you accept this it would probably be great to extract an abstract base class out of 'TransactionLogRecord' that contains only those entries that a Recoverer needs, so that I don't need to store values that have no use for the NIO journal.
-
Hide
- btm-nio-journal.zip
- 25/Apr/11 10:02 AM
- 36 kB
- Juergen Kellerer
-
- btm-nio-journal/.gitignore 0.0 kB
- btm-nio-journal/btm-nio-journal.iml 2 kB
- btm-nio-journal/pom.xml 2 kB
- btm-nio-journal/src/.../NioBufferPool.java 2 kB
- btm-nio-journal/.../NioCompositeIterator.java 2 kB
- btm-nio-journal/src/.../nio/NioJournal.java 19 kB
- btm-nio-journal/.../NioJournalConfiguration.java 2 kB
- btm-nio-journal/src/.../NioJournalFile.java 8 kB
- btm-nio-journal/.../NioJournalFileRecord.java 14 kB
- btm-nio-journal/src/.../NioLogRecord.java 7 kB
- btm-nio-journal/.../AbstractJournalFunctionalTest.java 5 kB
- btm-nio-journal/.../AbstractJournalPerformanceTest.java 4 kB
- btm-nio-journal/.../AbstractJournalTest.java 1 kB
- btm-nio-journal/.../DiskJournalFunctionalTest.java 3 kB
- btm-nio-journal/.../DiskJournalPerformanceTest.java 2 kB
- btm-nio-journal/.../NioJournalFunctionalTest.java 2 kB
- btm-nio-journal/.../NioJournalPerformanceTest.java 1 kB
- btm-nio-journal/.../NioLogRecordTest.java 2 kB
- btm-nio-journal/.../NullJournalPerformanceTest.java 1 kB
- btm-nio-journal/src/.../resources/log4j.xml 1 kB
- pom.xml 7 kB
-
Hide
- btm-nio-journal-2.1.2-SNAPSHOT.jar
- 25/Apr/11 10:02 AM
- 36 kB
- Juergen Kellerer
-
- META-INF/MANIFEST.MF 0.3 kB
- bitronix/tm/.../nio/NioBufferPool.class 3 kB
- bitronix/tm/.../NioCompositeIterator.class 2 kB
- bitronix/tm/.../nio/NioJournal$1.class 0.2 kB
- bitronix/tm/.../NioJournal$LogAppender.class 10 kB
- bitronix/tm/journal/nio/NioJournal.class 12 kB
- bitronix/.../NioJournalConfiguration.class 1 kB
- bitronix/tm/.../nio/NioJournalFile$1.class 1 kB
- bitronix/tm/.../nio/NioJournalFile.class 8 kB
- bitronix/tm/.../NioJournalFileRecord$1.class 1 kB
- bitronix/.../NioJournalFileRecord$JournalIterable$1.class 5 kB
- bitronix/.../NioJournalFileRecord$JournalIterable.class 3 kB
- bitronix/.../NioJournalFileRecord$ReadStatus.class 2 kB
- bitronix/tm/.../NioJournalFileRecord.class 9 kB
- bitronix/tm/.../nio/NioLogRecord$1.class 0.8 kB
- bitronix/tm/.../nio/NioLogRecord.class 8 kB
- META-INF/maven/.../btm-nio-journal/pom.xml 2 kB
- META-INF/maven/.../pom.properties 0.1 kB
-
- nio-journal.patch
- 25/Apr/11 10:02 AM
- 107 kB
- Juergen Kellerer
Activity
Hi Folks, the journal is currently a "work in progress" that is done in "https://github.com/jkellerer/btm-fork/commits/btm-2.2.0". It will make it to BTM 2.2.0 once it's stable and integrated enough.
Wow nice. Thanks for the contribution. I will also take a look at this in the next week or so.