Dashboard > Terracotta Developer Documentation > Home > LeftSideBar > tc.properties
  Terracotta Developer Documentation Log In   View a printable version of the current page.  
  tc.properties
Added by Taylor Gautier, last edited by Igal Levy on Jun 16, 2008  (view change)
Labels: 
(None)

Overview

Certain facilities, such as DSO client memory management, can be controlled through the tc.properties file, located in lib/tc.jar, in the package com.tc.properties. The tc.properties file is in the form of a standard java.util.Properties object. You can override the values of the bundled tc.properties file by either (1) creating a tc.properties file in the lib directory of the Terracotta distribution, or (2) passing individual tc.property keys to Java in the standard way by prepending com.tc. For example, to override the default value of the l1.cachemanager.threshold property, pass the following system property: -Dcom.tc.l1.cachemanager.threshold=60.

The tc.properties exist to centralize values used by various Terracotta subsystems and are not generally meant to be used by Terracotta developers. In future releases, any of the tc.properties listed below may be removed or upgraded to official configuration elements.

l1.cachemanager

The l1.cachemanager serves to implement a Virtual Heap for DSO clients. Based on the values listed below, the l1.cachemanager tracks the memory usage of your shared object set, responding to low-memory situations by nulling out lesser-used shared object references, allowing the Java memory-manager to reap those objects.

l1.cachemanager.threshold

When the percentage of used available heap space exceeds this value, a process begins wherein least-recently used shared objects are evicted from memory at regular stages. Evicted objects will be faulted back into the client from the Terracotta server when needed.
Default: 70

l1.cachemanager.criticalThreshold

When the percentage of used available heap space exceeds this value, aggressive measures are taken to maintain the amount of free memory at the level specified by the value of l1.cachemanager.threshold.
Default: 90

l1.cachemanager.percentageToEvict

When a low-memory situation is determined to exist and reaping occurs, this property specifies the amount of space to reclaim. This property's value is a percentage of the total size of the shared object set.
Default: 10

l2.l1reconnect

The l2.l1reconnect mechanism allows an L1 (application) to reconnect to an L2 (Terracotta server) after a network connection is broken.

l2.l1reconnect.enabled

This property specifies whether reconnection attempts can take place. This is an L2 property; an L1 gets it from an L2 at run time. If a mismatch exists between the client setting and the server setting in an active-passive setup, then the client prints a mismatch error and exits.
Default: false

l2.l1reconnect.timeout.millis

If l2.l1reconnect.enabled is set to true, then this property specifies the timeout (in milliseconds) for reconnection. This is an L2 property; an L1 gets it from an L2 at run time.
Default: 5000

String Compression

Compressing long strings can improve the efficiency of your clustered application. String-compression properties enable string compression and set the size limit that triggers compression.

l1.transactionmanager.strings.compress.enabled

Enables (true) or disables (false) string compression.
Default: True

l1.transactionmanager.strings.compress.minSize

Sets the minimum size (in bytes) a string must reach before compression is applied.
Default: 512

Network HA

Network High Availability (HA) properties ensure continuous uptime for your HA-enabled Terracotta cluster. These properties apply to an ACTIVE-PASSIVE networked Terracotta cluster.

l2.nha.tcgroupcomm.reconnect.enabled

When a network connection is broken between an active L2 and a passive L2, this property specifies whether an L2 attempts reconnection with its peer L2.
Default: false

l2.nha.tcgroupcomm.reconnect.timeout

If l2.nha.tcgroupcomm.reconnect.enabled is set to true, then this property specifies the timeout (in milliseconds) for reconnection.
Default: 5000

HealthChecker

HealthChecker is a connection monitor similar to TCP keepalive. HealthChecker functions between Terracotta servers (in High Availability environments), and between Terracotta severs and clients. Using HealthChecker, Terracotta nodes can determine if peer nodes are reachable, up, or in a GC operation. If a peer node is unreachable or down, a Terracotta node using HealthChecker can take corrective action.

HealthChecker properties are grouped into three different categories:

  • L2 -> L1 (Terracotta Server -> Terracotta Client)
  • L2 -> L2 (Terracotta Server -> Terracotta Server) - in HA
  • L1 -> L2 (Terracotta Client -> Terracotta Server)

The following properties are supported:

Property Definition Default for L2 -> L1 Default for L2 -> L2 Default for L1 -> L2
ping.enabled Enables (true) or disables (false) ping tests. true true true
ping.idletime The time (in milliseconds) that HealthChecker waits between ping tests. 30000 5000 5000
ping.interval If no response is received to a ping test, the time (in milliseconds) that HealthChecker waits between retries. 10000 1000 1000
ping.probes If no response is received to a ping test, the maximum number of retries HealthChecker can attempt. 6 3 3
socketConnect Enables (True) or disables (False) socket-connection tests. false (currently unsupported) true true
socketConnectCount The maximum failed socket connections HealthChecker allows before assuming that the target node is dead. 2 2 2
socketConnectTimeout Regardless of successful socket connections, the number (integer) of consecutive ping.intervals HealthChecker allows before assuming that the target node is dead. 2 10 10

Property category is indicated by the prefix:

  • l2.healthcheck.l1 indicates L2 -> L1
  • l2.healthcheck.l2 indicates L2 -> L2
  • l1.healthcheck.l2 indicates L1 -> L2

For example, the l2.healthcheck.l2.ping.enabled property applies to L2 -> L2.

Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.5 Build:#811 Jul 25, 2007) - Bug/feature request - Contact Administrators