Skip to content

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 /dev/shm and a RegistrationException was raised


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()

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=true Sparse IPC channel
  • aeron:udp?endpoint=|alias=def|sparse=true Sparse UDP channel (with endpoint and alias defined as well)

See Also