12.07.2015 Views

Caché High Availability Guide - InterSystems Documentation

Caché High Availability Guide - InterSystems Documentation

Caché High Availability Guide - InterSystems Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Cluster ManagementUse Local Storage of CountersContention for disk blocks is most common in the case of updating counters. To minimizethis problem, code your applications so that groups of counters (for example, 10) are allocatedper remote request to a local private directory. Thereafter, whenever a local process needs anew counter index number, it first checks the private directory to see if one of the ten isavailable. If not, it then goes to allocate a new set of ten counters from the clustered directory.You can use $INCREMENT to update counters and retrieve the value in a single operation.Note:This is also a good strategy for nonclustered networked systems.In addition to reducing contention when accessing counters, this technique also enhancesaccess of records that use those counters. Since a system obtains contiguous counters, blocksplitting combined with the <strong>Caché</strong> collating sequence work causes records created by differentnodes to be located in different areas of the database. Therefore, processes on different nodesdo their SETs and KILLs into different blocks and are no longer in contention, thus reducingdisk I/O.6.9 <strong>Caché</strong> ObjectScript Language FeaturesThe following sections provide information about <strong>Caché</strong> ObjectScript language features withimplications for cluster mounted database systems.6.9.1 Remote <strong>Caché</strong> ObjectScript LocksThe following information details remote locks under <strong>Caché</strong> ObjectScript, with respect to acluster environment.6.9.1.1 Remote Lock HandlingInformation about remote locks is stored in two places:• In the Lock Table on the system requesting the lock (the client)• In the Lock Table on the system to which the lock request is directed (the server)The server for items in a cluster-mounted database is always the Lock Server (Cluster Master).When a process on the client system needs to acquire a remote lock, it first checks to see ifan entry is already present in the client lock table, indicating that another process on thatsame computer already has a lock on the remote item.116 <strong>Caché</strong> <strong>High</strong> <strong>Availability</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!