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