Skip to main content

New memory model and GC

3 replies [Last post]
haug
Offline
Joined: 2004-10-11
Points: 0

On the server side multiple applications run inside the same VM. They are separated by the class loader but they share the same memory heap. That means that one memory consuming application can nearly stop a server.
On the other hand the garbage collection stops the whole server for a noticeable time. Even well configured servers with a heap of 1GB or more stop working for a second and more. IBM has measured pause times of 8 minutes on their large system. A server must be able to give an answer within 100 milli seconds or it is useless for a wide area of applications.
A new memory model could solve these issues. Objects of different classloaders are incompatible, why not use a seperate heap for every classloader? Since the GC time heavily depends on the heap size this may reduce down times and solves the protection issue. There are some problems to solve to get that going but I think it is necessary for a reliable server.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
opinali
Offline
Joined: 2003-06-17
Points: 0

(1) JSR-121 (Isolates) (certainly coming to 6.0!)

(2) JSR-001 (RealTime Java) (only the memory area stuff)

haug
Offline
Joined: 2004-10-11
Points: 0

JSR-121 might solves the isolation issue, i'll check that.
JSR-001 doesn't solve the real time issue. Yes, it is a real time specification for hard real time constraints. It needs special coding to get predictable answering times. I've never seen an application server (J2EE) that runs on a real time VM. Do you really want to wait 8 minutes at a door because the application server collects garbage and can not answer the id check which normally takes milli seconds?
On normal databases the response time depends on the load, on a J2EE server it depends on luck. A J2EE server is the back bone of an enterprise, it needs to be available within a specific time. The current VMs con not provide that. There are research VMs which can reduce the garbage collection interruption time to about 10ms.

brucechapman
Offline
Joined: 2004-03-18
Points: 0

Objects can have references to objects whose classloader is different from their own. Partitioning the GC along classloader boundaries would not work in the general case.