|
Re: [Jdbm-general] JDBM questions
From: <rickard@dr...> - 2003-08-05 06:00
|
Alex Boisvert wrote: > The log file is not just a temporary file. It may hold data from > committed transactions that have not yet been synchronized (to disk) > into the main database file. > > Hence, you cannot only backup the main database file. You would risk > getting an incoherent snapshot of your data. > > The transaction log is currently synchronized every 10 transactions > (specified in TransactionManager.java) but I plan to make that > configurable via options passed to the RecordManagerFactory. Would it be possible to add a method to explicitly flush the tx log? That way I could lock the whole thing, flush the tx log, and then do backup of a single file. That'd be awesome! > There isn't much planned at the moment between now and version 1.0. > > My ideal wish list for 1.0 would be the following: > > 1) Key compression in BTree. This has been requested and some patches > where posted earlier but never integrated since there was not thorough > testing of the patches. The reason for inclusion of this in 1.0 is that > it would certainly introduce some incompatible file-level changes and I > would ideally like to get them in 1.0 so that we can call the file > format "final" afterwards. (Is anything final in this world?? :-)) > > 2) Compaction utility for the database to reduce data file fragmentation. > > 3) Small configuration changes (like the transaction synchronization > threshold mentioned above) Sounds good to me. I have a couple of generic performance improvements I did for Jisp which might work well here as well, such as an unsynchronized block-oriented ByteArrayOutputStream. Comes in handy especially with large output streams. > I see very little changes at the API level and the stability has been > good so far so it's not really an issue for 1.0. > > The biggest project in there is the compaction utility i think, and I'm > not sure it's a real requirement for a 1.0 release. We would need some > feedback from long-running apps to see how much fragmentation is created > and how much performance is lost due to that. The problem with regard to fragmentation that we have seen with Jisp are: *) Since it wasn't paged we got loads of small holes which were never reused (i.e. small object created, then removed, then hole is never reused again). Compaction every month or so typically did give us about 20-30% extra storage. If I remember correctly JDBM uses paging (i.e. fix-sized blocks instead of size equal to output size), so this should be a non-issue here. *) We store files in Jisp. This means that the db needs to be able to handle that sometimes really small Java objects are stored, and sometimes multimedia movies in the 50Mb-100Mb range are stored. If such a file is removed then the hole needs to be reused in a smart way (like chunk it up for many small objects). But, the first three priorities for us are: 1) Stability 2) Stability 3) Stability We are using this in a CMS which is being beat on quite heavily (our webhotel has 15 customers whose websites are in one database). We've had some (nightmare) crashes with Jisp, and if JDBM can prove to be more stable we would be truly happy :-) /Rickard |
| Thread | Author | Date | |
|---|---|---|---|
| [Jdbm-general] JDBM questions | <rickard@dr...> |
|
|
|
|
|
|
|
|
|
|
|
|