Patent ID: 7415491

Claim:
An automatic heap size optimizing method for automatically optimizing a heap size in a computer system that implements garbage collection, the method comprising: a first step of collecting and recording profile data concerning identification information, size information, or time information about a created object or a live object for calculating a longevity of the object, at least at creation of the object, at access to the object, and at garbage collection; a second step of analyzing the recorded profile data, calculating the longevity of each object, and adding up sizes of live objects to obtain a required heap size at a given time; and a third step of determining a target heap size according to a criterion predetermined from a balance between throughput performance and response performance or a criterion specified by an operator by using a longevity characteristic concerning the longevity of each object and the required heap size calculated in the second step; wherein a thread number of a thread creating an object is recorded as the profile data at creation of the object in the first step and a thread number of a thread accessing the object is recorded as the profile data at access to the object in the first step, and wherein the first step further comprises a step of generating information indicating whether each object is a thread local object or a thread global object from the thread number of the thread that has generated the object and the thread number of the thread that has accessed the object.