experimental disabling of db write buffer

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1605 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 19 years ago
parent 954f02d22e
commit 01c668fe1b

@ -84,6 +84,7 @@ public class kelondroRecords {
// constants // constants
private static final int NUL = Integer.MIN_VALUE; // the meta value for the kelondroRecords' NUL abstraction private static final int NUL = Integer.MIN_VALUE; // the meta value for the kelondroRecords' NUL abstraction
private static final long memBlock = 500000; // do not fill cache further if the amount of available memory is less that this private static final long memBlock = 500000; // do not fill cache further if the amount of available memory is less that this
public final static boolean useWriteBuffer = false;
// memory calculation // memory calculation
private static final int element_in_cache = 52; private static final int element_in_cache = 52;
@ -238,8 +239,11 @@ public class kelondroRecords {
int[] columns, int FHandles, int txtProps, int txtPropWidth, long writeBufferSize) throws IOException { int[] columns, int FHandles, int txtProps, int txtPropWidth, long writeBufferSize) throws IOException {
// create new Chunked IO // create new Chunked IO
if (useWriteBuffer) {
this.entryFile = new kelondroBufferedIOChunks(ra, ra.name(), writeBufferSize, 30000 + random.nextLong() % 30000); this.entryFile = new kelondroBufferedIOChunks(ra, ra.name(), writeBufferSize, 30000 + random.nextLong() % 30000);
//this.entryFile = new kelondroRAIOChunks(ra, ra.name()); } else {
this.entryFile = new kelondroRAIOChunks(ra, ra.name());
}
// store dynamic run-time data // store dynamic run-time data
this.overhead = ohbytec + 4 * ohhandlec; this.overhead = ohbytec + 4 * ohhandlec;
@ -368,8 +372,11 @@ public class kelondroRecords {
private void init(kelondroRA ra, long writeBufferSize) throws IOException { private void init(kelondroRA ra, long writeBufferSize) throws IOException {
// read from Chunked IO // read from Chunked IO
if (useWriteBuffer) {
this.entryFile = new kelondroBufferedIOChunks(ra, ra.name(), writeBufferSize, 30000 + random.nextLong() % 30000); this.entryFile = new kelondroBufferedIOChunks(ra, ra.name(), writeBufferSize, 30000 + random.nextLong() % 30000);
//this.entryFile = new kelondroRAIOChunks(ra, ra.name()); } else {
this.entryFile = new kelondroRAIOChunks(ra, ra.name());
}
// read dynamic variables that are back-ups of stored values in file; // read dynamic variables that are back-ups of stored values in file;
// read/defined on instantiation // read/defined on instantiation

Loading…
Cancel
Save