comparison config/blitz-act.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
comparison
equal deleted inserted replaced
-1:000000000000 0:3dc0c5604566
1 import net.jini.discovery.DiscoveryGroupManagement;
2
3 import java.rmi.activation.ActivationID;
4
5 import java.util.logging.Level;
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 import net.jini.activation.ActivationExporter;
17
18 import org.dancres.blitz.stats.Switch;
19 import org.dancres.blitz.stats.OpSwitch;
20 import org.dancres.blitz.stats.InstanceSwitch;
21
22 import org.dancres.blitz.remote.debug.DebugILFactory;
23
24 import org.dancres.blitz.lease.LeaseReaper;
25
26 import org.dancres.blitz.config.Persistent;
27 import org.dancres.blitz.config.TimeBarrierPersistent;
28 import org.dancres.blitz.config.Transient;
29 import org.dancres.blitz.config.EntryConstraint;
30 import org.dancres.blitz.config.CacheSize;
31 import org.dancres.blitz.config.Fifo;
32
33 import net.jini.core.entry.Entry;
34
35 org.dancres.blitz {
36 // logDebug = new Boolean(true);
37
38 // disableBitmaps = new Boolean(true);
39
40 // Default logging level
41 //
42 defaultLogLevel = Level.SEVERE;
43
44 // ignoreLogConfig = new Boolean(true);
45
46 // Examples of setting log levels for specific components
47 //
48 // org_dancres_blitz_disk_DiskLogLevel = Level.INFO;
49 // org_dancres_blitz_entry_SearchVisitorImplLogLevel = Level.FINE;
50 // org_dancres_blitz_arc_cacheLogLevel = Level.INFO;
51 // org_dancres_blitz_oid_AllocatorLogLevel = Level.ALL;
52 // org_dancres_blitz_txn_LogBatcherLogLevel = Level.ALL;
53
54 // Published on the proxy as a Name attribute
55 //
56 name = "dancres";
57
58 // Set this to a LoginContext instance when you wish to run the server
59 // as a particular principle
60 //
61 // loginContext =
62
63 // Location to store meta info and entrys.
64 // NOTE: Each concurrent Blitz instance should use a different directory
65 // for it's logs and persistent state - if this isn't done
66 // "bad things will happen" (TM)
67 //
68 persistDir = "/Users/dan/src/jini/blitz_pj/dbfiles_dancres";
69
70 // Location of log files - SHOULD BE DIFFERENT FROM ABOVE
71 //
72 logDir = "/Volumes/log/dan/prevlog/";
73
74 // Maximum number of async write threads
75 // DO NOT CHANGE THIS - BLITZ DOESN'T SUPPORT MORE THAN ONE WRITE THREAD
76 // (YET!)
77 //
78 maxWriteThreads = 1;
79
80 // How long to keep write threads alive in the pool
81 //
82 threadKeepalive = 15;
83
84 // The preferred queue size for pending writes
85 //
86 desiredPendingWrites = 4000;
87
88 // throttlePendingWrites = 8000;
89 throttlePendingWrites = Integer.MAX_VALUE;
90
91 // Size of the berkeley DB cache
92 //
93 // dbCache = 8388608;
94 dbCache = 33554432;
95 // dbCache = 268435456;
96 // dbCache = 134217728;
97 // dbCache = 536870912;
98
99 // Configures the maximum number of concurrent Db transactions
100 // Bigger is better! This value has been validated for 64 concurrent
101 // JavaSpace operations
102 //
103 maxDbTxns = 256;
104
105 // Dump Db statistics after every checkpoint if this is true
106 // WARNING: dumping stats is broken in 4.1.25 -
107 // ask Dan (dan@dancres.org) for a patch. This should be fixed in Db 4.2,
108 // will test and then post an update to the website
109 //
110 dumpDbStats = new Boolean(false);
111
112 // Dump statistics for write queue usage
113 // When tuning/configuring Blitz for various systems, these stats help
114 // to determine I/O performance requirements and required memory
115 //
116 dumpWQStats = new Boolean(false);
117
118 // Turn this on to get reports on checkpointing behaviour - useful for
119 // tuning
120 logCkpts = new Boolean(true);
121
122 // Maximum number of entry instances to cache for a particular Entry type
123 //
124 // entryReposCacheSize = 512;
125 //entryReposCacheSize = 1024;
126 entryReposCacheSize = 4096;
127 // entryReposCacheSize = 8192;
128 // entryReposCacheSize = 100;
129
130 // maxDbLog = 50000000;
131
132 // Type specific constraints - define a variable using the classname of
133 // the type, replaceing . or $ with _. The variable should then be
134 // initialized to an array of EntryConstraints specifying requirements.
135 // Note, if you wish to enable FIFO, reduce pendingWrites queue
136 //
137 // org_dancres_blitz_SpaceWriteTakeTest_TestEntry =
138 // new EntryConstraint[] {new CacheSize(512), new Fifo()};
139
140 // org_dancres_blitz_SpaceFifonessTest_TestEntry =
141 // new EntryConstraint[] {new CacheSize(1024), new Fifo()};
142
143 // org_dancres_blitz_test_DummyEntry =
144 // new EntryConstraint[] {new CacheSize(1024), new Fifo()};
145
146 // org_dancres_blitz_SpaceFifonessTest_TestEntry =
147 // new EntryConstraint[] {new CacheSize(512)};
148
149 // Non-blocking transactions are used within the entry package to
150 // prevent deadlock. Such transactions can fail and require aborting
151 // should they fail to get a lock. When this happens, the thread
152 // attempting the transaction will backoff by an amount of time dictated
153 // by base_backoff + Random(jitter) ms which should allow the conflicting
154 // transaction time to complete. Format is {base_backoff, jitter}
155 loadBackoff = new int[] {20, 50};
156
157 // The maximum allowable lease time for entries and notify registrations
158 // To permit Lease.FOREVER, set the LeaseBound = 0.
159 // To deny Lease.FOREVER and set an upper limit on lease time set the
160 // LeaseBound to a positive non-zero value in milliseconds
161 //
162 entryLeaseBound = 0;
163 notifyLeaseBound = 0;
164
165 // eventQueueBound = 20;
166 // taskQueueBound = 100;
167
168 // How often to do an active cleanup of lease expired resources
169 // Value should be ms - 0 disables active cleanup. Normally, Blitz
170 // uses read/take activity to do cleanup (passive). If memory or
171 // disk resource is scarce, configure this to non-zero to activate more
172 // aggressive cleaning (which, in turn, is more CPU aggressive).
173 //
174 leaseReapInterval = 0;
175 // leaseReapInterval = LeaseReaper.MANUAL_REAP;
176 // leaseReapInterval = 1800000;
177
178 // Number of OID allocators to use for entries
179 maxOidAllocators = 512;
180
181 // How often to log event allocation to disk
182 //
183 eventgenSaveInterval = 50;
184
185 // How big a jump in notify sequence numbers there should be following
186 // restart/crash
187 //
188 eventgenRestartJump = 1000;
189
190 // Maximum number of task threads to be used in posting remote events
191 // and dispatching blocked takes or reads
192 //
193 maxTaskThreads = 10;
194
195 storageModel = new Transient();
196
197 // storageModel = new TimeBarrierPersistent(true, true, 50000, 262144, 5000);
198
199 // Persistent storage settings
200 // Note: The third parameter (batching time) can radically affect
201 // throughput in concurrent conditions. You're advised to try various
202 // settings for your desired load as variations in OS and hard-disk
203 // performance determine what is appropriate for each machine.
204 //
205 // Note: The final parameter (buffer size) can also radically affect
206 // throughput. It needs to be large enough to hold all transactional
207 // information produced by the batcher. Thus if your average load is
208 // 20 transactions, you will want to scale the buffer size to hold 20
209 // transactions worth of operations.
210 //
211
212 // For raw, single-threaded benchmarks, use 0 log buffering time
213 // storageModel = new Persistent(true, true, 0, true, 100, 8192);
214
215 // For concurrent benchmark or application use non-zero log buffering time
216 // storageModel = new Persistent(true, true, 10, true, 10000, 32768);
217
218 // Use this setting for network usage - we add additional time to
219 // log-buffering to account for network latency
220 //
221 // storageModel = new Persistent(true, true, 20, true, false, 20000, 8192);
222
223 debugPort = 0;
224 // debugPort = 12345;
225
226 // Enable standard destroy semantics - by default, Blitz does NOT
227 // delete state at destroy. Enable that feature here and invoke
228 // BlitzAdmin::shutdown to perform a shutdown whilst retaining state
229 compliantDestroy = new Boolean(false);
230
231 // Default Stats to make available
232 stats = new Switch[] {new OpSwitch(OpSwitch.ALL_TYPES,
233 OpSwitch.TAKE_OPS, true),
234 new OpSwitch(OpSwitch.ALL_TYPES, OpSwitch.READ_OPS, true),
235 new OpSwitch(OpSwitch.ALL_TYPES, OpSwitch.WRITE_OPS, true),
236 new InstanceSwitch(InstanceSwitch.ALL_TYPES, true)};
237
238 // The initial lookup groups to register with - after first boot
239 // this information is held in a meta database and should be configured
240 // via JoinAdmin
241 //
242 // initialGroups = new String[]{};
243
244 // initialGroups = new String[]{"JERI_Group1"};
245 // initialGroups = DiscoveryGroupManagement.ALL_GROUPS;
246
247
248 // The initial lookup locators to register with - after first boot
249 // this information is held in a meta database and should be configured
250 // via JoinAdmin
251 //
252 // initialLocators = new LookupLocator[] {new LookupLocator("jini://rogue/")};
253
254 // The initial attributes to register with - note that these need to be
255 // available as part of the codebase.
256 // This information is held in a meta database and should be configured
257 // via JoinAdmin
258 //
259 // initialAttrs = new Entry[] {};
260
261 // The exporter to use - see the JINI documentation
262 //
263 // serverExporter = new JrmpExporter();
264
265 // For ACTIVATION, we must nest a normal exporter inside an activation
266 // exporter instance.
267 //
268 exporter= new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
269 new ProxyTrustILFactory(null, null), false, true);
270
271 //use an ActivationExporter to create a persistent ref
272 serverExporter= new ActivationExporter((ActivationID) $data,exporter);
273
274 // Blitz provides a suitable default for all these but this is how you'd
275 // configure them explicitly
276 //
277 notifyPreparer = new BasicProxyPreparer();
278 recoveredNotifyPreparer = new BasicProxyPreparer();
279 txnPreparer = new BasicProxyPreparer();
280 recoveredTxnPreparer = new BasicProxyPreparer();
281 activationIdPreparer = new BasicProxyPreparer();
282 activationSysPreparer = new BasicProxyPreparer();
283 }