comparison config/blitz.config @ 0:3dc0c5604566

Initial checkin of blitz 2.0 fcs - no installer yet.
author Dan Creswell <dan.creswell@gmail.com>
date Sat, 21 Mar 2009 11:00:06 +0000
parents
children e3649bdf4973
comparison
equal deleted inserted replaced
-1:000000000000 0:3dc0c5604566
1 import net.jini.discovery.DiscoveryGroupManagement;
2
3 import java.util.logging.Level;
4
5 import java.net.InetSocketAddress;
6
7 import net.jini.security.BasicProxyPreparer;
8
9 import net.jini.core.discovery.LookupLocator;
10
11 import net.jini.jeri.tcp.TcpServerEndpoint;
12 import net.jini.jeri.ProxyTrustILFactory;
13 import net.jini.jeri.BasicILFactory;
14 import net.jini.jeri.BasicJeriExporter;
15 import net.jini.jrmp.JrmpExporter;
16
17 import org.dancres.blitz.stats.Switch;
18 import org.dancres.blitz.stats.OpSwitch;
19 import org.dancres.blitz.stats.InstanceSwitch;
20
21 import org.dancres.blitz.remote.debug.DebugILFactory;
22
23 import org.dancres.blitz.config.Persistent;
24 import org.dancres.blitz.config.TimeBarrierPersistent;
25 import org.dancres.blitz.config.Transient;
26 import org.dancres.blitz.config.EntryConstraint;
27 import org.dancres.blitz.config.CacheSize;
28 import org.dancres.blitz.config.Fifo;
29
30 import net.jini.core.entry.Entry;
31
32 import org.dancres.blitz.SpaceWriteTakeTest.TestEntry;
33
34 import org.dancres.blitz.remote.user.ColocatedAgent;
35
36 org.dancres.blitz {
37
38 // *IfExists is a significant performance drain and by default Blitz aggressively
39 // optimizes event delivery for those calls such that events from writes close to
40 // the resolution point may be ignored. If you are using *IfExists and require
41 // completely deterministic behaviour, enable this option. For those not using
42 // *IfExists leave this option disabled for better performance.
43 //
44 syncNotifyOnWrite = true;
45
46 // agents = new ColocatedAgent[] {new example.Init()};
47
48 ignoreLogConfig = new Boolean(true);
49
50 // Default logging level
51 //
52 // defaultLogLevel = Level.SEVERE;
53
54 // Example of setting log levels for specific components
55 //
56 // org_dancres_blitz_disk_DiskLogLevel = Level.INFO;
57
58 // Published on the proxy as a Name attribute
59 //
60 name = "dancres";
61
62 // Set this to a LoginContext instance when you wish to run the server
63 // as a particular principle
64 //
65 // loginContext =
66
67 // Location to store meta info and entrys.
68 // NOTE: Each concurrent Blitz instance should use a different directory
69 // for it's logs and persistent state - if this isn't done
70 // "bad things will happen" (TM)
71 //
72 persistDir = "/Users/dan/src/jini/blitz_2fcs/dbfiles_dancres";
73
74 // Location of log files - SHOULD BE DIFFERENT FROM ABOVE
75 //
76 logDir = "/Volumes/Data/log/dan/prevlog/";
77
78 // Maximum number of async write threads
79 // DO NOT CHANGE THIS - BLITZ DOESN'T SUPPORT MORE THAN ONE WRITE THREAD
80 // (YET!)
81 //
82 maxWriteThreads = 1;
83
84 // How long to keep write threads alive in the pool
85 //
86 // threadKeepalive = 15000;
87
88 // The preferred queue size for pending writes
89 //
90 desiredPendingWrites = 256;
91 // desiredPendingWrites = 16;
92
93 // Size of the berkeley DB cache
94 // You can run in 64Mb with this setting
95 //
96 dbCache = 27262976;
97
98 // For this cache size, expect to use -Xmx128m
99 //
100 // dbCache = "32M";
101
102 // For this cache size, expect to use -Xmx256m
103 //
104 // dbCache = 134217728;
105
106 // Configures the maximum number of concurrent Db transactions
107 // Bigger is better! This value has been validated for 64 concurrent
108 // JavaSpace operations
109 //
110 maxDbTxns = 256;
111
112 // Dump Db statistics after every checkpoint if this is true
113 //
114 dumpDbStats = new Boolean(false);
115
116 // Dump statistics for write queue usage
117 // When tuning/configuring Blitz for various systems, these stats help
118 // to determine I/O performance requirements and required memory
119 //
120 // dumpWQStats = new Boolean(true);
121
122 // Turn this on to get reports on checkpointing behaviour - useful for
123 // tuning
124 logCkpts = new Boolean(false);
125
126 // Maximum number of entry instances to cache for a particular Entry type
127 //
128 entryReposCacheSize = 4096;
129 // entryReposCacheSize = 100;
130 // entryReposCacheSize = 512;
131
132 // Enable generic readahead for all types by setting this to non-zero.
133 // Actual value determines how many Entry's will be loaded from disk
134 // when readahead is activated. Note this value should be smaller than
135 // cache size. As per cache size above, this can be set per Entry using
136 // EntryConstraints as below for FIFO.
137 //
138 // entryReposReadahead = 256;
139
140 // Type specific constraints - define a variable using the classname of
141 // the type, replaceing . or $ with _. The variable should then be
142 // initialized to an array of EntryConstraints specifying requirements.
143 // Note, if you wish to enable FIFO, reduce pendingWrites queue
144 //
145 // org_dancres_blitz_remote_test_SpaceFifonessTest_TestEntry =
146 // new EntryConstraint[] {new CacheSize(512), new Fifo()};
147
148 // org_dancres_blitz_SpaceBlockTest_TestEntry =
149 // new EntryConstraint[] {new Fifo()};
150
151 // org_dancres_blitz_SpaceFifonessTest_TestEntry =
152 // new EntryConstraint[] {new CacheSize(512), new Fifo()};
153
154 // Non-blocking transactions are used within the entry package to
155 // prevent deadlock. Such transactions can fail and require aborting
156 // should they fail to get a lock. When this happens, the thread
157 // attempting the transaction will backoff by an amount of time dictated
158 // by base_backoff + Random(jitter) ms which should allow the conflicting
159 // transaction time to complete. Format is {base_backoff, jitter}
160 loadBackoff = new int[] {20, 50};
161
162 // The maximum allowable lease time for entries and notify registrations
163 // To permit Lease.FOREVER, set the LeaseBound = 0.
164 // To deny Lease.FOREVER and set an upper limit on lease time set the
165 // LeaseBound to a positive non-zero value in milliseconds
166 //
167 entryLeaseBound = 0;
168 notifyLeaseBound = 0;
169
170 // How often to do an active cleanup of lease expired resources
171 // Value should be ms - 0 disables active cleanup. Normally, Blitz
172 // uses read/take activity to do cleanup (passive). If memory or
173 // disk resource is scarce, configure this to non-zero to activate more
174 // aggressive cleaning (which, in turn, is more CPU aggressive).
175 //
176 leaseReapInterval = 0;
177 // leaseReapInterval = 60000;
178 // leaseReapInterval = 1800000;
179
180 // Number of OID allocators to use for entries
181 maxOidAllocators = 512;
182
183 // How often to log event allocation to disk
184 //
185 eventgenSaveInterval = 50;
186
187 // How big a jump in notify sequence numbers there should be following
188 // restart/crash
189 //
190 eventgenRestartJump = 1000;
191
192 // Maximum number of task threads to be used in posting remote events
193 // and dispatching blocked takes or reads
194 //
195 maxTaskThreads = 8;
196 maxEventProcessors = 4;
197
198 storageModel = new Transient();
199
200 // storageModel = new TimeBarrierPersistent(true, true, 10000, 524288, 10000);
201
202 // Persistent storage settings
203 // Note: The third parameter (batching time) can radically affect
204 // throughput in concurrent conditions. You're advised to try various
205 // settings for your desired load as variations in OS and hard-disk
206 // performance determine what is appropriate for each machine.
207 //
208 // A safe setting to start with is 10ms but you might also wish to try 0ms
209 // Use this setting for local/embedded usage
210 //
211
212 // For raw, single-threaded benchmarks, use 0 log buffering time
213 // storageModel = new Persistent(true, true, 0, true, 10000, 32768);
214 // notifytest storageModel = new Persistent(true, true, 0, true, 10, 32768);
215
216 // For concurrent benchmark or application use non-zero log buffering time
217 // storageModel = new Persistent(true, true, 10, true, 10000, 32768);
218
219 statsDump = 10000;
220
221 // Enable standard destroy semantics - by default, Blitz does NOT
222 // delete state at destroy. Enable that feature here and invoke
223 // BlitzAdmin::shutdown to perform a shutdown whilst retaining state
224 compliantDestroy = new Boolean(false);
225
226 // Default Stats to make available
227 stats = new Switch[] {new OpSwitch(OpSwitch.ALL_TYPES,
228 OpSwitch.TAKE_OPS, true),
229 new OpSwitch(OpSwitch.ALL_TYPES, OpSwitch.READ_OPS, true),
230 new OpSwitch(OpSwitch.ALL_TYPES, OpSwitch.WRITE_OPS, true),
231 new InstanceSwitch(InstanceSwitch.ALL_TYPES, true)};
232
233 // The initial lookup groups to register with - after first boot
234 // this information is held in a meta database and should be configured
235 // via JoinAdmin
236 //
237 // initialGroups = new String[]{};
238 // initialGroups = new String[]{"JERI_Group1"};
239 // initialGroups = DiscoveryGroupManagement.ALL_GROUPS;
240
241
242 // The initial lookup locators to register with - after first boot
243 // this information is held in a meta database and should be configured
244 // via JoinAdmin
245 //
246 // initialLocators = new LookupLocator[] {new LookupLocator("jini://rogue/")};
247
248 // The initial attributes to register with - note that these need to be
249 // available as part of the codebase.
250 // This information is held in a meta database and should be configured
251 // via JoinAdmin
252 //
253 // initialAttrs = new Entry[] {};
254
255 // The exporter to use - see the JINI documentation
256 //
257 serverExporter = new BasicJeriExporter(
258 TcpServerEndpoint.getInstance(0),
259 new ProxyTrustILFactory(null, null), false, true);
260
261 // This will enable the inbuilt debugging layer which displays client-side
262 // method invocations and provides timing data
263 //
264 // serverExporter = new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
265 // new DebugILFactory(null, null), false, true);
266
267 // For ACTIVATION, we must nest a normal exporter inside an activation
268 // exporter instance.
269 //
270 // exporter= new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
271 // new ProxyTrustILFactory(null, null), false, true);
272
273 //use an ActivationExporter to create a persistent ref
274 // serverExporter= new ActivationExporter((ActivationID) $data,exporter);
275
276 // Enables the in-built loopback transaction manager - note the manager
277 // can only be used to co-ordinate transactions against this blitz instance
278 // it cannot co-ordinate multiple and/or remote participants such as other
279 // Blitz instances [EXPERIMENTAL]
280 //
281 // loopbackTxnExporter =
282 // new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
283 // new BasicILFactory(null, null), false, true);
284
285 // Blitz provides a suitable default for all these but this is how you'd
286 // configure them explicitly
287 //
288 notifyPreparer = new BasicProxyPreparer();
289 recoveredNotifyPreparer = new BasicProxyPreparer();
290 txnPreparer = new BasicProxyPreparer();
291 recoveredTxnPreparer = new BasicProxyPreparer();
292 activationIdPreparer = new BasicProxyPreparer();
293 activationSysPreparer = new BasicProxyPreparer();
294 }