Use this page to set Java virtual machine (JVM) custom properties
to maintain cache entries that are saved to disk.
Example
You can set the custom properties
globally to affect all cache instances, or you can set the custom property
on a single cache instance. In most cases, set the properties on the individual
cache instances. To set the custom properties on the default cache instance,
use the global option. If you set the same property both globally and on a
cache instance, the value that is set on the cache instance overrides the
global value.
To configure the custom properties on a single object
cache instance or servlet cache instance, perform the following steps:
- In the administrative console, click one of the following paths:
- To configure a servlet cache instance, click Resources > Cache instances
> Servlet cache instances > servlet_cache_instance_name > Custom
properties > New.
- To configure an object cache instance, click Resources > Cache instances
> Object cache instances > object_cache_instance_name > Custom
properties > New.
- Type the name of the custom property. When configuring these custom properties
on a single cache instance, you do not use the full property path. For example,
type explictBufferLimitOnStop to configure the com.ibm.ws.cache.CacheConfig.explictBufferLimitOnStop
custom property.
- Type a valid value for the property in the Value field.
- Save the property and restart WebSphere Application Server.
To configure the custom property globally across all configured cache
instances, perform the following steps:
- In the administrative console, click Servers > Application servers
> server_name > Java and process management > Process definition
> Java virtual machine > Custom properties > New.
- Type the name of the custom property (com.ibm.ws.cache.CacheConfig.explictBufferLimitOnStop)
in the Name field.
- Type a valid value for the property in the Value field.
- Save the property and restart WebSphere Application Server.
com.ibm.ws.cache.CacheConfig.htodCleanupFrequency
Use
this property to change the amount of time between disk cache cleanup.
Important: Setting this custom property manually is
deprecated for V6.1. Therefore, you should use the administrative console
to set this property. To set this property in the administrative console,
click one of the following paths:
- To configure a servlet cache instance, click Resources > Cache instances
> Servlet cache instances > servlet_cache_instance_name.
- To configure an object cache instance, click Resources > Cache instances
> Object cache instances > object_cache_instance_name.
Then:
- Under Disk Cache setting, select the Enable disk offload field if it is
not already selected.
- Under Performance Settings, select Balanced performance and balanced memory
usage or Custom.
- In the Disk cache cleanup frequency field, specify an appropriate length
of time, in minutes.
By default, the disk cache cleanup is scheduled to run
at midnight to remove expired cache entries and cache entries that have not
been accessed in the past 24 hours. However, if you have thousands of cache
entries that might expire within one or two hours, the files that are in the
disk cache can grow large and become unmanageable. Use the com.ibm.ws.cache.CacheConfig.htodCleanupFrequency custom
property to change the time interval between disk cache cleanup.
Units |
minutes For example, a value of 60 means 60 minutes between each
disk cache cleanup.
|
Default |
0 The disk cache cleanup occurs at midnight every 24 hours.
|
com.ibm.ws.cache.CacheConfig.htodDelayOffloadEntriesLimit
Use
this property to specify the number of different cache IDs that can be saved
in memory for the dependency ID and template buffers. Consider increasing
this value if you have a lot of memory in your server and you want to increase
the performance of your disk cache.
Important: Setting
this custom property manually is deprecated for V6.1. Therefore, you should
use the administrative console to set this property. To set this property
in the administrative console, click one of the following paths:
- To configure a servlet cache instance, click Resources > Cache instances
> Servlet cache instances > servlet_cache_instance_name.
- To configure an object cache instance, click Resources > Cache instances
> Object cache instances > object_cache_instance_name.
Then:
- Under Disk Cache setting, select the Enable disk offload field, if it
is not already selected.
- Under Disk Cache settings, select Limit disk cache size in entries, if
it is not already selected.
- In the Disk cache size field, specify the number of cache IDs that can
be saved in memory for the dependency ID and template buffers.
Units |
number of cache IDs For example, a value of 1000 means that each
dependency ID or template ID can have up to 1000 different cache IDs in memory.
|
Default |
1000 |
Minimum |
100 |
Tune the delay offload function
Use these properties
to tune the delay offload function for the disk cache.
Important: Setting these custom properties manually is deprecated for
WebSphere Application Server Version 6.1. Use the administrative console to
set these properties. The individual property descriptions include information
on how to use the administrative console to set these properties.
The
delay offload function uses extra memory buffers for dependency IDs and templates
to delay the disk offload and minimize the input and output operations. However,
if most of your cache IDs are longer than 100 bytes, the delay offload function
might use too much memory. Use any combination of the following properties
to tune your configuration:
- To increase or decrease the in-memory limit of cache IDs for dependency
ID and template buffers, use the com.ibm.ws.cache.CacheConfig.htodDelayOffloadEntriesLimit custom
property.
- To disable the disk cache delay offload function, use the com.ibm.ws.cache.CacheConfig.htodDelayOffload custom
property. Disabling this property saves all cache entries to disk immediately
after removing them from the memory cache.
com.ibm.ws.cache.CacheConfig.explictBufferLimitOnStop
Use
this custom property when the flush-to-disk-on-stop feature is enabled. When
the server is stopping, offloads are limited to the value specified for this
property, pending removal of entries in the explicit invalidation buffer.
If this property is set to 0, there is no limit to the number
of offloads that can occur. Only positive integers are accepted as values
for this property. If the number of entries in the explicit invalidation buffer
is greater then the specified limit, all of the disk files for this specified
cache instance are deleted after the server stops.
Important: You
cannot use the administrative console to set this property.
com.ibm.ws.cache.CacheConfig.batchUpdateMilliseconds
Use
this custom property to tune CPU idle time by specifying a batch update frequency
in terms of milliseconds. Setting this property will result in dynamic cache
processing updates more frequently, and thus reducing the payload size. This
custom property must be configured globally for all configured cache instances.
Default
value: 1000 milliseconds (1 second)
To configure the custom property
globally across all configured cache instances, perform the following steps:
- In the administrative console, click Servers > Application servers
> server_name > Java and process management > Process definition
> Java virtual machine > Custom properties > New.
- Type the name of the custom property (com.ibm.ws.cache.CacheConfig.explictBufferLimitOnStop)
in the Name field.
- Type a valid value for the property in the Value field.
- Save the property and restart WebSphere Application Server.
com.ibm.ws.cache.CacheConfig.timeGranularityInSeconds
Use
this custom property to tune CPU idle time by specifying an expiration time
frequency in terms of seconds. This setting controls the frequency at which
Dynamic cache checks for expired cache entries. This custom property must
be configured globally for all configured cache instances.
Default
value: 5 seconds
To configure the custom property globally across
all configured cache instances, perform the following steps:
- In the administrative console, click Servers > Application servers
> server_name > Java and process management > Process definition
> Java virtual machine > Custom properties > New.
- Type the name of the custom property (com.ibm.ws.cache.CacheConfig.explictBufferLimitOnStop)
in the Name field.
- Type a valid value for the property in the Value field.
- Save the property and restart WebSphere Application Server.
com.ibm.ws.cache.CacheConfig.lruToDiskTriggerTime
Use
this custom property to tune CPU idle time by specifying, in milliseconds,
a time wake-up frequency. This setting determines how often a time -limit
thread is awaken. The wake-up thread evicts LRU entries if the maximum cache
size is reached. If the disk offload feature is enabled, the evicted entry
will offload to disk. Otherwise, it will be thrown away. In addition, the
wake-up thread checks whether the expiration time frequency is reached for
processing removal of expired entries. This custom property must be configured
globally for all configured cache instances.
Default value: 5000
milliseconds (5 seconds)
The following table summarizes the values
that can be specified for the batchUpdateMilliseconds, lruToDiskTriggerTime,
and timeGranularityInSeconds custom properties.
Custom properties |
Minimum |
Maximum |
Constraint |
Default |
batchUpdateMilliseconds |
1 millisecond |
maximum integer |
none |
1000 milliseconds (1 second) |
lruToDiskTriggerTime |
1 millisecond |
Value specified for the timeGranularityInSeconds custom property. |
The value cannot be larger than the value specified for the timeGranularityInSeconds
custom property |
5000 milliseconds (5 seconds) |
timeGranularityInSeconds |
1 second |
maximum integer |
none |
5 seconds |
To configure the custom property globally across all configured
cache instances, perform the following steps:
- In the administrative console, click Servers > Application servers
> server_name > Java and process management > Process definition
> Java virtual machine > Custom properties > New.
- Type the name of the custom property (com.ibm.ws.cache.CacheConfig.explictBufferLimitOnStop)
in the Name field.
- Type a valid value for the property in the Value field.
- Save the property and restart WebSphere Application Server.