Ok, a look into Paged.java showed me that these *16* file descriptors are 
opened if there are 16 request at one time, which is good for a high 
performance. But isn't it a bad idea to just leave them open forever? As I see 
it closeDescriptor is only called if Database is shutdown. Wouldn't it be 
better to close these file descriptors if they are not needed any more?
I know this not that easy, cause a simple solution that just closes them within 
putDescriptor if they are not immediately needed will probably be not best 
solution according to performance. The other possibility to run some kind of a 
background thread that closes file descriptors if they have not been used for a 
possibly configurable amount of time is of course a bit tricky.

Bjoern

-----Ursprüngliche Nachricht-----
Von: Vadim Gritsenko [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 17. Juni 2005 15:13
An: xindice-users@xml.apache.org
Betreff: Re: AW: how can I prevent "too many open files"?

Eickvonder Bjoern wrote:
> I got a fixed number of 16 collections including the root collection plus 2 
> collections per "test that a user publishes". In my current state I have 29 
> of these tests in my system (which should only be a medium amount). Now 
> Xindice does somehow have two file handles for each idx, tbl and tbl from the 
> meta directory. This results in a total number of 12 handles per collection, 
> i.e. (16+29*2)*12 = 888 file handles held open. If now adding all the jars, 
> cached jars, log-files and so on that are held open by tomcat for each 
> running webapplication...
> The problem is that I could increase the size by changing the parameters 
> within the kernel and then recompile it, but how do I tell customers, that 
> install the application on their on servers, that they first have to 
> recompile their kernel?

JFYI, Xindice can use up to *16* file descriptors open for each paged file 
(configurable). Collection filers, indexes, system and meta collections all use 
paged file. Reason for several descriptors is really obvious: you want several 
clients to be able access the database at the same time, don't you? Hence, you 
have to have several descriptors to be used in parallel threads.

See Paged.java for details.

Vadim



____________
Virus checked by G DATA AntiVirusKit
Version: AVK 15.0.5572 from 19.06.2005

Reply via email to