public static final class EngineConfig.Ports extends Object
Modifier and Type | Field and Description |
---|---|
static EngineProperty<Integer> |
BATCH_SIZE
Property specifying the size of token batches in queues.
|
static EngineProperty<Boolean> |
SIZE_BY_READERS
Property controlling whether queues are initially sized based on the number of readers.
|
static EngineProperty<Integer> |
SPOOL_THRESHOLD
Property specifying the number of unread batches which triggers spooling mode for the queue.
|
static EngineProperty<Integer> |
WRITEAHEAD
Property specifying the amount unread data which can be held in queues.
|
Modifier and Type | Method and Description |
---|---|
EngineConfig |
batchSize(int size)
Specifies the port should publish pushed data in batches
of the specified size.
|
int |
getBatchSize()
Retrieves the configured batch size.
|
int |
getSpoolThreshold()
Retrieves the configured threshold at batches are stored to disk.
|
int |
getWriteahead()
Retrieves the configured queue size.
|
boolean |
isSizeByReaders()
Indicates whether queues will automatically adjust their writeahead
limits based on the number of readers.
|
EngineConfig |
noSpooling()
Disables writers writing published batches to disk.
|
EngineConfig |
sizeByReaders(boolean enabled)
Specifies whether the initial writeahead for a port should
be automatically determined based on the number of readers.
|
EngineConfig |
spoolThreshold(int size)
Specifies the threshold at which the writer begins writing
published batches to disk.
|
EngineConfig |
writeahead(int size)
Specifies the number of unread batches which a port
can publish before blocking.
|
public static final EngineProperty<Integer> SPOOL_THRESHOLD
public static final EngineProperty<Boolean> SIZE_BY_READERS
public static final EngineProperty<Integer> WRITEAHEAD
public static final EngineProperty<Integer> BATCH_SIZE
public int getSpoolThreshold()
public EngineConfig spoolThreshold(int size)
This setting can be used to place an upper bound on the
memory used for data queues between dataflow processes.
Performance will possibly degrade, but OutOfMemoryError
s
which kill the graph will be avoided.
size
- the number of unread batches at which overflow
spooling behavior is triggeredEngineConfig
with the settings modifiedwriteahead(int)
public EngineConfig noSpooling()
OutOfMemoryError
s when
queue expansion is occurring, but avoids the performance
overhead of disk I/O when memory buffers are full.EngineConfig
with the settings modifiedspoolThreshold(int)
public boolean isSizeByReaders()
true
if queues will automatically adjust their sizespublic EngineConfig sizeByReaders(boolean enabled)
Enabling this can help reduce contention on queues having a large number of readers.
enabled
- whether to enableEngineConfig
with the settings modifiedwriteahead(int)
public int getWriteahead()
public EngineConfig writeahead(int size)
Writeahead allows variation in writer performance to be smoothed out by buffering "fast" writers. Increasing this value can also decrease contention between readers, as access is spread across more batches. However, this also increases memory usage.
size
- the number of batchesEngineConfig
with the settings modifiedpublic int getBatchSize()
public EngineConfig batchSize(int size)
flush()
method is called on the port.
Batching reduces overhead due to synchronization between dataflow processes, as they need to synchronize less frequently. However, large batch sizes can also be detrimental as it increases both memory usage and latency. Batch size should only be modified with care.
size
- the batch sizeEngineConfig
with the settings modifiedCopyright © 2019 Actian Corporation. All rights reserved.