From: Kevin D. <ke...@tr...> - 2006-03-31 22:13:09
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <STYLE type=text/css> P, UL, OL, DL, DIR, MENU, PRE { margin: 0 auto;}</STYLE> <META content="MSHTML 6.00.2900.2802" name=GENERATOR></HEAD> <BODY leftMargin=1 topMargin=1 rightMargin=1><FONT face=Tahoma> <DIV><FONT face=Arial size=2>When I first started using jdbm (it seems like a long time ago), I found massive improvements in performance by getting rid of default serialization and using custom serializers. The Java serialization mechanism is a pig - there is massive amounts of meta data included in the output stream - and it uses reflection for everything.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Bryan's work on the extensible serialization (in the current CVS branch) should make custom serialization even easier to use - definitely take a look.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Also, depending on your key design, enabling key compression may be a help - the compression algorithm is very fast, and the reduced disk IO should more than compensate.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Have you adjusted your BTree page size so the pages are about the size of your file system's page? A little under is better than a little over (and, no, there isn't a mechanism for querying the on disk size of a BPage - but you could get at it with a debugger pretty easily :-) ).</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Cheers,</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>- K</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2></FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2> </FONT> <TABLE> <TBODY> <TR> <TD width=1 bgColor=blue><FONT face=Arial size=2></FONT></TD> <TD><FONT face=Arial size=2><FONT color=red>> Elias,<BR><BR>What jdbm version are you using? If you are using the current version in<BR>CVS there is an option in RecordManagerOptions to use an extensible<BR>serializer package, both for your own classes and for btree. You also want<BR>to make sure that you using the cache layer and that you are only forcing a<BR>commit when that is necessary.<BR><BR>-bryan<BR><BR>-----Original Message-----<BR>From: <A href="mailto:jdb...@li..."><FONT color=#0000ff>jdb...@li...</FONT></A><BR><A href="mailto:jdb...@li..."><FONT color=#0000ff>[mailto:jdb...@li...]</FONT></A> On Behalf Of Elias Ross<BR>Sent: Friday, March 31, 2006 2:04 PM<BR>To: <A href="mailto:jdb...@li..."><FONT color=#0000ff>jdb...@li...</FONT></A><BR>Subject: [Jdbm-developer] JBossCache and JBPM<BR><BR><BR>I just finished writing JBPM support for JBossCache, which also supports<BR>Berkeley DB and JDBC for persistence.<BR><BR><A href="http://www.jboss.org/products/jbosscache"><FONT color=#0000ff>http://www.jboss.org/products/jbosscache</FONT></A><BR><BR>It's actually about 3-4 times slower than BerkeleyDB. Which I suspect<BR>from profiling during a load test, is due to some extent to how<BR>serialization is managed. (Some of it is likely due to my novice<BR>implementation, please look)<BR><BR><A href="http://fisheye.jboss.com/viewrep/JBoss/JBossCache/src/org/jboss/cache/loader"><FONT color=#0000ff>http://fisheye.jboss.com/viewrep/JBoss/JBossCache/src/org/jboss/cache/loader</FONT></A><BR>/jdbm/JdbmCacheLoader.java<BR><BR>[sorry for the long URL]<BR><BR>I wrote my own Key and Value serialization functions, which helped quite<BR>a bit. But the serialization internally uses Java default<BR>serialization. And there's a lot of copying and creation etc. within<BR>the jdbm.tree.BPage class.<BR><BR>The design suggests changing the interface Serializer of into a<BR>different interface or abstract base class. Something resembling the<BR>BerkeleyDB class repository, perhaps?<BR><BR>I wondered if there were any thoughts on this? Do you want help?<BR><BR><BR><BR><BR>-------------------------------------------------------<BR>This SF.Net email is sponsored by xPML, a groundbreaking scripting language<BR>that extends applications into web and mobile media. Attend the live webcast<BR>and join the prime developer group breaking into this new coding territory!<BR><A href="http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642"><FONT color=#0000ff>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642</FONT></A><BR>_______________________________________________<BR>Jdbm-developer mailing list<BR><A href="mailto:Jdb...@li..."><FONT color=#0000ff>Jdb...@li...</FONT></A><BR><A href="https://lists.sourceforge.net/lists/listinfo/jdbm-developer"><FONT color=#0000ff>https://lists.sourceforge.net/lists/listinfo/jdbm-developer</FONT></A><BR><BR><BR>-------------------------------------------------------<BR>This SF.Net email is sponsored by xPML, a groundbreaking scripting language<BR>that extends applications into web and mobile media. Attend the live webcast<BR>and join the prime developer group breaking into this new coding territory!<BR><A href="http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642"><FONT color=#0000ff>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642</FONT></A><BR>_______________________________________________<BR>Jdbm-developer mailing list<BR><A href="mailto:Jdb...@li..."><FONT color=#0000ff>Jdb...@li...</FONT></A><BR><A href="https://lists.sourceforge.net/lists/listinfo/jdbm-developer"><FONT color=#0000ff>https://lists.sourceforge.net/lists/listinfo/jdbm-developer</FONT></A><BR><BR><<BR></FONT></FONT></TD></TR></TBODY></TABLE></DIV></FONT></BODY></HTML> |