OnixS C++ B3 Binary UMDF Market Data Handler  1.6.3
API documentation
OrderBookPoolSettings Struct Reference

#include <OnixS/B3/MarketData/UMDF/OrderBook.h>

Classes

struct  GrowthPolicy
 

Public Attributes

size_t chunksAmount = 1000
 
size_t chunkLength = 512 * 1024
 
bool preferHugePage = false
 
GrowthPolicy growthPolicy = {GrowthPolicy::Addition, 1.0f}
 

Detailed Description

To improve performance, the OrderBook keeps some of its internals in the preallocated memory areas (chunks).

The chunks are initially owned by the OrderBookPool object. The OrderBookPool object is shared between the OrderBooks (and can be shared between several instances of the handlers).

When a chunk is taken from the pool, it is not shared between the other order books, so the number of the chunks must be at least equal to the number of order books. A single order book can use from 1 to 255 chunks if necessary.

The number of books equals the number of securities on a channel or the size of the security filter (if used).

Placing the order book's internals into a single chunk improves data locality and can thus improve performance, so the chunk must be sufficient to fit the book content. On the other hand, making a chunk too big can lead to excessive memory consumption.

Definition at line 50 of file OrderBook.h.

Member Data Documentation

size_t chunkLength = 512 * 1024

Length of a chunk.

The maximum chunk length should not be much more than the size of memory necessary to store all orders for security.

Note
The minimal value is 1024.

Definition at line 59 of file OrderBook.h.

size_t chunksAmount = 1000

Amount of memory chunks.

Note
If the pool is exhausted, the chunks are allocated dynamically and a warning is risen.

Definition at line 54 of file OrderBook.h.

GrowthPolicy growthPolicy = {GrowthPolicy::Addition, 1.0f}

Definition at line 84 of file OrderBook.h.

bool preferHugePage = false

Use Huge pages for chunk allocation.

Note
Takes effect on Linux only.
Huge pages must be enabled on the system level.

Definition at line 64 of file OrderBook.h.


The documentation for this struct was generated from the following file: