I set Term Buffer to x, but I see much larger log buffer files. Why?¶
- You see much larger than expected log buffer sizes
- You've put your log buffers on
Log buffers contain 3 term buffers, plus metadata. Thus, log buffer sizing is 3x term buffer sizing.
When you set the Media Driver folder via the
MediaDriver.Context, you're setting the root folder for the data files required for the Media Driver to operate. The Log Buffers are stored under directories in this folder.
final MediaDriver.Context mediaDriverCtx = new MediaDriver.Context() .aeronDirectoryName("/dev/shm/md");
Here's an example media driver folder containing two IPC publications:
The files are created at their full size by default, since this ensures no surprises at runtime and allows for best performance. If you want to stop this behavior, use the
sparse=true channel parameter in a Publication, for example:
aeron:ipc?sparse=trueSparse IPC channel
aeron:udp?endpoint=192.168.0.1:12345|alias=def|sparse=trueSparse UDP channel (with endpoint and alias defined as well)