From john at synchromesh.com Fri Jun 1 15:50:23 2012 From: john at synchromesh.com (John Pallister) Date: Fri, 1 Jun 2012 16:50:23 +0100 Subject: [rucksack-devel] Compacting the heap? Message-ID: Hello list, My application (written in LispWorks 6.1 for Windows) uses Rucksack, and I've found that after running for a long time (i.e. months) and creating a few objects (about 6,000) and then deleting about half of them my heap file has grown to 20MB and my objects file is about 500KB. Which is not a problem, but I'm getting large pauses in my application's execution when I access the Rucksack store. none of my objects hold references to other objects, only their string IDs. I'm going to write a routine to periodically copy all the remaining objects from one store to an empty store with the same schema, then switch to using the new store. This will hopefully compact the heap and rebuild the indexes, thereby improving performance. As I understand it, there's no manual GC operation in the Rucksack API. Is there something I'm missing, and/or can anyone recommend a better way to reinvigorate my Rucksack store? Thanks very much, John :^P -- John Pallister john at johnp.net john at synchromesh.com From alemmens at xs4all.nl Sun Jun 3 16:20:34 2012 From: alemmens at xs4all.nl (Arthur Lemmens) Date: Sun, 03 Jun 2012 18:20:34 +0200 Subject: [rucksack-devel] Compacting the heap? In-Reply-To: References: Message-ID: John Pallister wrote: > I'm going to write a routine to periodically copy all the remaining > objects from one store to an empty store with the same schema, then > switch to using the new store. This will hopefully compact the heap > and rebuild the indexes, thereby improving performance. > > As I understand it, there's no manual GC operation in the Rucksack > API. I haven't looked at this for years, but have you tried COLLECT-GARBAGE? This will not rebuild any indexes, but it should get rid of objects that aren't referenced anywhere. I have no idea if this will also result in improved performance, though. Arthur From john at synchromesh.com Thu Jun 7 14:52:31 2012 From: john at synchromesh.com (John Pallister) Date: Thu, 7 Jun 2012 15:52:31 +0100 Subject: [rucksack-devel] Compacting the heap? In-Reply-To: References: Message-ID: Hi Arthur, Thanks for your reply. Yes, COLLECT-GARBAGE seems to do the trick; it hasn't shrunk the heap file, but it certainly seems to have improved performance. It isn't exported though, hence my overlooking it. I often think that it would be great to try and gather people's experiences with Rucksack and produce some sort of "best practices" document. It's a great library, but sometimes I wonder whether I'm using it quite as intended (particularly when I hit performance problems). Are you still using Rucksack yourself these days? Cheers, John :^P -- John Pallister john at johnp.net john at synchromesh.com On Sun, Jun 3, 2012 at 5:20 PM, Arthur Lemmens wrote: > John Pallister wrote: > >> I'm going to write a routine to periodically copy all the remaining >> objects from one store to an empty store with the same schema, then >> switch to using the new store. This will hopefully compact the heap >> and rebuild the indexes, thereby improving performance. >> >> As I understand it, there's no manual GC operation in the Rucksack >> API. > > > I haven't looked at this for years, but have you tried COLLECT-GARBAGE? > This will not rebuild any indexes, but it should get rid of objects > that aren't referenced anywhere. ?I have no idea if this will also > result in improved performance, though. > > Arthur > > _______________________________________________ > rucksack-devel mailing list > rucksack-devel at common-lisp.net > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/rucksack-devel