db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Peterson" <publicay...@verizon.net>
Subject RE: initial page allocation versus incremental allocation
Date Wed, 04 Mar 2009 05:45:55 GMT
Won't this still limit the setting to the MAX_PRE_ALLOC_SIZE?  Why have the maximum setting?
Or, at least, why limit it to just 8 pages? If it is configurable, then applications that
need the option have it available, and those that don't can continue using the default settings.
I'm surprised there's an option to configure the initial allocation but not the increment

What I've been trying to do is use Derby in a client application that needs to download more
data than will fit into heap. The objects get serialized into rows and are indexed by the
row number and an additional java.util.UUID that identifies the object. The client gui can
analyze the data and display the results and the raw data as required.

The loading works great up to the initial allocation of pages, then it crawls, which cascades
through and disrupts the whole application. It looks like I could solve this by configuring
the page-increment size just like the initial allocation setting. 

I had hoped to use Derby as a kind of general purpose heap management solution. It has been
doing a great job of limiting the amount of heap it uses, and it integrates well with the
rest of the application, but the slowdown of the table loading is killing me. 


-----Original Message-----
From: Knut.Hatlen@Sun.COM [mailto:Knut.Hatlen@Sun.COM] 
Sent: Tuesday, March 03, 2009 3:28 AM
To: Derby Discussion
Subject: Re: initial page allocation versus incremental allocation

Brian Peterson <dianeayers@verizon.net> writes:

> I see that there’s a property to allow configuring the number of pages
> to initially allocate to a table, derby.storage.initialPages, but
> there isn’t a property to allow for setting the number of pages to
> allocate when incrementally expanding the file container. It looks
> like RawStoreFactory might’ve allowed for this with
> public static final String PRE_ALLOCATE_PAGE = “derby.storage.pagePerAllocation”;
> but this isn’t reference by anything I can find.

I haven't tested that it actually works, but it appears to be referenced
in FileContainer.createInfoFromProp():

	PreAllocSize = 
		PropertyUtil.getServiceInt(tc, createArgs,
				DEFAULT_PRE_ALLOC_SIZE /* default */);

If it turns out that setting the property works, we should probably try
to get it into the documentation, as it looks like it could be useful.

Knut Anders

View raw message