IP Library Granted Patent US 8,533,710
Granted Patent B1
US 8,533,710 · App. 11/514,550 · Granted Sep 10, 2013

Using observed thread activity to dynamically tune a virtual machine for responsiveness

Inventors: Dean R. E. Long (Boulder Creek, CA); Yin Zin Mark Lam (Milpitas, CA)
Assignee: Oracle America, Inc.
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,533,710
App. No.
11/514,550
Granted
Sep 10, 2013
Kind
B1
Abstract

One embodiment of the present invention provides a system that uses observed thread activity to dynamically tune a virtual machine for responsiveness and/or throughput. During operation, the system observes the activity of a thread to determine whether the thread needs responsiveness and/or throughput. Next, the system gathers statistics for the thread based on these observations of thread activity, and then uses these statistics to dynamically tune a virtual machine upon which the thread will execute.

Claims (61)

1. A method for using observed thread activity to dynamically tune a virtual machine for responsiveness or throughput, comprising:

in a computer system, performing the operations of:

observing the activity of a thread in a set of threads to determine whether the thread needs at least one of responsiveness or throughput, wherein observing the activity of a thread involves identifying a priority for the thread, wherein if the thread is a high-priority thread, the thread is categorized as needing responsiveness;

gathering statistics for the thread from the observations of thread activity to determine a level of responsiveness needed by the thread, wherein gathering the statistics comprises tracking at least one of frequency of context switches of high-priority threads and intervals between the execution of high-priority threads, and maintaining a set of measured values corresponding to the level of responsiveness, the measured values being decayed over time to ensure that the measured values reflect recent behavior; and

dynamically tuning a virtual machine upon which the thread will execute based on the gathered statistics and the level of responsiveness.

2. The method of claim 1 , wherein gathering the statistics for the thread involves:

translating the set of measured values into a set of configuration parameters for the virtual machine.

3. The method of claim 1 ,

wherein dynamically tuning a virtual machine involves dynamically changing or re-configuring virtual machine behavior or priorities; and

wherein dynamically changing or re-configuring virtual machine behavior can involve dynamically changing or re-configuring virtual machine runtime components including:

a garbage-collector;

a just-in-time compiler; and/or

a thread-synchronization system.

4. The method of claim 1 ,

wherein observing the activity of the thread involves instrumenting a system scheduler to track priorities when switching threads; and

wherein tracking priorities assists in determining the responsiveness needed by the thread.

5. The method of claim 1 , wherein gathering the statistics further comprises observing a population of objects being instantiated.

6. The method of claim 1 ,

wherein gathering statistics involves tracking a set of access patterns for the set of threads; and

wherein tracking the set of access patterns includes tracking a frequency of context switches of high-priority threads and an interval between the execution of high-priority threads.

7. The method of claim 1 ,

wherein observing the activity of the thread includes observing inter-thread synchronization mechanisms; and

wherein inter-thread synchronization mechanisms include notify-wait operations and locking mechanisms.

8. A non-transitory computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a method for using observed thread activity to dynamically tune a virtual machine for responsiveness or throughput, the method comprising:

observing the activity of a thread in a set of threads to determine whether the thread needs at least one of responsiveness or throughput, wherein observing the activity of a thread involves identifying a priority for the thread, wherein if the thread is a high-priority thread, the thread is categorized as needing responsiveness;

gathering statistics for the thread from the observations of thread activity to determine a level of responsiveness needed by the thread, wherein gathering the statistics comprises tracking at least one of frequency of context switches of high-priority threads and intervals between the execution of high-priority threads, and maintaining a set of measured values corresponding to the level of responsiveness, the measured values being decayed over time to ensure that the measured values reflect recent behavior; and

dynamically tuning a virtual machine upon which the thread will execute based on the gathered statistics and the level of responsiveness.

9. The non-transitory computer-readable storage medium of claim 8 , wherein gathering the statistics for the thread involves:

translating the set of measured values into a set of configuration parameters for the virtual machine.

10. The non-transitory computer-readable storage medium of claim 8 ,

wherein dynamically tuning a virtual machine involves dynamically changing or re-configuring virtual machine behavior or priorities; and

wherein dynamically changing or re-configuring virtual machine behavior can involve dynamically changing or reconfiguring virtual machine runtime components including:

a garbage-collector;

a just-in-time compiler; and/or

a thread-synchronization system.

11. The non-transitory computer-readable storage medium of claim 8 , wherein observing the activity of the thread involves instrumenting a system scheduler to track priorities when switching threads; and

wherein tracking priorities assists in determining the responsiveness needed by the thread.

12. The non-transitory computer-readable storage medium of claim 8 ,

wherein gathering statistics involves tracking a set of access patterns for the set of threads; and

wherein tracking the set of access patterns includes tracking a frequency of context switches of high-priority threads and an interval between the execution of high-priority threads.

13. The non-transitory computer-readable storage medium of claim 8 ,

wherein observing the activity of the thread includes observing inter-thread synchronization mechanisms; and

wherein inter-thread synchronization mechanisms include notify-wait operations and locking mechanisms.

14. A computing device that includes a processor that uses observed thread activity to dynamically tune a virtual machine for responsiveness and/or throughput, wherein the processor comprises:

an observation mechanism that observes the activity of a thread in a set of threads to determine whether the thread needs at least one of responsiveness or throughput, wherein the observation mechanism is further configured to identify a priority for the thread, and wherein if the thread is identified as a high-priority thread, the thread is categorized as needing responsiveness;

a gathering mechanism that gathers statistics for the thread from the observations of thread activity to determine a level of responsiveness needed by the thread, wherein gathering the statistics comprises tracking a set of access patterns comprises tracking at least one of frequency of context switches of high-priority threads and intervals between the execution of high-priority threads, and maintaining a set of measured values corresponding to the level of responsiveness, the measured values being decayed over time to ensure that the measured values reflect recent behavior; and

a tuning mechanism configured to dynamically tune a virtual machine upon which the thread will execute based on the gathered statistics and the level of responsiveness.

15. The apparatus of claim 14 ,

wherein the gathering mechanism is further configured to translate the set of measured values into a set of configuration parameters for the virtual machine.

16. The apparatus of claim 14 ,

wherein the tuning mechanism is further configured to dynamically change or re-configure virtual machine behavior or priorities; and

wherein dynamically changing or re-configuring virtual machine behavior can involve dynamically changing or re-configuring virtual machine runtime components including:

a garbage-collector;

a just-in-time compiler; and/or

a thread-synchronization system.

17. The apparatus of claim 14 ,

wherein the gathering mechanism is further configured to track a set of access patterns for the set of threads, and

wherein tracking the set of access patterns includes tracking a frequency of context switches of high-priority threads and an interval between the execution of high-priority threads.

18. The apparatus of claim 14 ,

wherein the observation mechanism is further configured to observe inter-thread synchronization mechanisms; and

wherein inter-thread synchronization mechanisms include notify-wait operations and locking mechanisms.

Assignments (2)
MERGER AND CHANGE OF NAME Recorded Dec 16, 2015
From: ORACLE USA, INC.; SUN MICROSYSTEMS, INC.; ORACLE AMERICA, INC.
To: ORACLE AMERICA, INC.
Reel/Frame 037311/0206 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 31, 2006
From: LONG, DEAN R. E.; LAM, YIN ZIN MARK
To: SUN MICROSYSTEMS, INC.
Reel/Frame 018263/0891 →