From: thomas at tada.se (Thomas Hallgren) Date: Fri, 24 Feb 2006 21:40:56 +0100 Subject: [Pljava-dev] PL/Java functions and JDBC In-Reply-To: <44D9FC40FD695B4E85F1C59965C27E0FAA4D79@man3> References: <44D9FC40FD695B4E85F1C59965C27E0FAA4D79@man3> Message-ID: <43FF6F58.9040300@tada.se> Tim Clarke wrote: > Thomas/Patrick > May I jump in with a question on that point? If each connection uses its > own JVM then > 1) Have you any idea what the approximate memory overhead is? > I've measured between 20-40MB virtual memory and 6-13MB real memory per session using a standard Sun JVM with no special tuning. It might become more of course. It all depends on what you are doing. > 2) How do we force the JVM to unload when a new JAR is released? I am > having fun with that at the moment - I am dropping the connection > entirely which is a bit cumbersome. This is going to give me a problem > when I go live shortly. > > There's no way to do that at present. It wouldn't be too hard to write a C function that does it though, but I've had problems reloading the JVM after that. I'm not sure JNI is designed to handle multiple load/unload in a good way, nor am I sure that a JVM unload will free up a significant amount of memory. Are you using a connection pool at present? Regards, Thomas Hallgren