View Runtime Cache Statistics and Manage Configuration
Terracotta comes with a console
that lets you inspect and dynamically change the runtime contents, statistics,
and configuration of the distributed cache.
To see it in action, start the console:
%> <terracotta>/bin/dev-console.sh
When the console starts, you will see a
splash screen prompting you to connect to the
Terracotta server. The Terracotta server
coordinates all of the statistics gathering
and configuration management of the cache
cluster.
Click the "Connect..." button to connect the
console to the cluster.

Once connected, open the Ehcache statistics
and configuration panel by clicking on
Ehcache in the tree-control menu:

Click reload on your browser a few times and
you will see the meter in the console
register a green bar indicating cache hits.
The red bar indicates cache misses and the
blue bar indicates cache puts:

Click on the "Statistics" tab in the console
to see the runtime statistics graphs:

Click on the "Configuration" tab in the
console to view and manage the cache
configuration:

Try changing the "time to idle" parameter on
the cache to 10 seconds to see the
configuration change in real time:

You can see the effect of the configuration
change by loading colors into the cache. If
you view them again before the new 10 second
idle threshold, they will be loaded from cache.
After 10 seconds of idleness, they will be
evicted from the cache. If you view the
other application server, you'll see the
cache entries have been evicted uniformly
from all instances of the cache.
|