IP Library Granted Patent US 8,578,379
Granted Patent B2
US 8,578,379 · App. 13/281,757 · Granted Nov 5, 2013

Managing memory overload of java virtual machines in web application server systems

Inventors: Douglas C. Berg (Rochester, MN); Hai Shan Wu (Beijing, CN); Brian K. Smith (Raleigh, NC); Michael J. Spreitzer (Croton-On-Hudson, NY)
Assignee: International Business Machines Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,578,379
App. No.
13/281,757
Granted
Nov 5, 2013
Kind
B2
Abstract

The invention relates to memory overload management for Java virtual machines (JVMs) in Web application sever systems. Disclosed is a method and system of memory overload management for a Web application sever system, wherein the Web application sever system comprises multiple JVMs, the method comprising: determining one or more replica shards for which replacement shall be performed; determining one or more target JVMs for storing a corresponding replica shard set including at least one replica shard from the one or more replica shards; and for each target JVM, performing the following: judging whether the free memory of the target JVM is adequate for storing the corresponding replica shard set; if the judging result is negative, performing the following: causing the target JVM to suspend the creation of session until the free memory of the target JVM becomes adequate for storing the corresponding replica shard set.

Claims (41)

1. A method of memory overload management for a Web application server system, wherein the Web application server system comprises multiple Java machines (JVMs) for processing sessions, the method comprising:

determining one or more replica shards for which replacement shall be performed;

determining one or more target JVMs for storing a corresponding replica shard set including at least one replica shard from the one or more replica shards;

calculating JVMs average session lifetime avgSessLifeTime k :

avgSessLifeTime k =outs tan dingSess k /(0.5*admiRate k +0.5*admiRate k-1 ,)

wherein outs tan dingSess k is the number of currently pending sessions, admiRate k is the current session admission rate, and admiRate k -l is the session admission rate during the period between two most recent times of global garbage collection (GC); and

for each target JVM, performing the following:

judging whether the free memory of the target JVM is adequate for storing the corresponding replica shard set;

if the judging result is negative, performing the following:

causing the target JVM to suspend the creation of session until the free memory of the target JVM becomes adequate for storing the corresponding replica shard set;

storing the corresponding replica shard set to the target JVM; and

causing the target JVM to resume the creation of session.

2. The method of claim 1 , wherein if the judging result is positive, then store the corresponding replica shard set to the target JVM.

3. The method of claim 1 , wherein said determining one or more target JVMs for storing a corresponding replica shard set including at least one replica shard from the one or more replica shards comprises taking the JVM with short average session lifetime as target JVM.

4. The method of claim 1 , wherein said judging whether the free memory of the target JVM is adequate for storing the corresponding replica shard set further comprises calculating the free memory of the target JVM freeHeapEstim k with the following formula:

freeHeapEstim k =totalHeap−heapUtilEstim k *totalHeap

wherein totalHeap denotes the total amount of memory, and heapUtilEstim k is the estimated value of heap utilization between the most recent global GC and the next global GC.

5. The method of claim 4 , wherein

heapUtilEstim k =a *heapUtil k +b *admiRate k , and

wherein heapUtil k is the heap utilization after the most recent GC, admiRate k is the current session admission rate, and a and b are experience parameters learned from the session admission rate and the heap utilization obtained from past sampling cycles.

6. The method of claim 1 , wherein the Web application server system comprises a catalog server by which the replica shard are stored onto the target JVM.

7. The method of claim 6 , further comprising:

the target JVM is notified by the catalog server to resume accepting request for the creation of session after the corresponding replica shard set are stored onto the target JVM.

8. A system of memory overload management for a Web application server system, the Web application server system comprising multiple Java machines (JVMs) for processing sessions, the system comprising:

a replica shard determining device, configured to determine one or more replica shards for which replacement shall be conducted;

a target JVM determining device, configured to determine one or more target JVMs for storing a corresponding replica shard set including at least one replica shard from the one or more replica shards determined by the replica shard determining device;

a device for calculating the JVMs average session lifetime avgSessLifeTime k according to the following formula:

avgSessLifeTime k =outs tan dingSess k /(0.5*admiRate k +0.5*admiRate k-1 )

wherein outs tan dingSess k is the number of currently pending sessions, admiRate k is the current session admission rate, and admiRate k-1 is the session admission rate during the period between two most recent times of global garbage collection (GC);

a judging device, configured to judge whether the free memory of a target JVM is adequate for storing the corresponding replica shard set;

a session control device, configured to control the creation of session on a target JVM depending on whether the free memory of the target JVM is adequate for storing the corresponding replica shard set; and

a shard replacement device, configured to store a replica shard onto a target JVM when the free memory of the target JVM is adequate for storing a corresponding replica shard set.

9. The system of claim 8 , wherein the session control device is configured to cause the target JVM to suspend the creation of session when the free memory of the target JVM is not adequate for storing the corresponding replica shard set.

10. The system of claim 9 , wherein the session control device is configured to cause the target JVM to resume the creation of session when the free memory of the target JVM is adequate for storing the corresponding replica shard set.

11. The system of claim 8 , wherein the target JVM determining device is configured to take the JVM with short average session lifetime as target JVM.

12. The system of claim 8 , further comprising a device for calculating the free memory of the target JVM freeHeapEstim k with the following formula:

freeHeapEstim k =totalHeap−heapUtilEstim k *totlaHeap

wherein totalHeap denotes the total amount of memory, and heapUtilEstim k is the estimated value of heap utilization between the most recent global GC and the next global GC.

13. The system of claim 8 , wherein

heapUtilEstim k =a *heapUtil k +b *admiRate k , and

wherein heapUtil k is the heap utilization after the most recent GC, admiRate k is the current session admission rate, and a and b are experience parameters learned from the session admission rate and the heap utilization obtained from past sampling cycles.

Assignments (2)
CONVEYOR IS ASSIGNING UNDIVIDED 50% INTEREST Recorded Jan 11, 2018
From: INTERNATIONAL BUSINESS MACHINES
To: SERVICENOW, INC.; INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 045047/0229 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 26, 2011
From: BERG, DOUGLAS C.; WU, HAI SHAN; SMITH, BRIAN K.; SPREITZER, MICHAEL J.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 027124/0578 →
Priority Claims (1)
CN 2010 1 0577046 · Nov 30, 2010 · national
Continuity (1)
Related Publication 20120137290A1 · May 31, 2012