Documentation
DocumentationDiscussions
Documentation
These docs are for v2022.1. Click to read the latest docs for v2024.3.

Memory

Details on using the Seq Docker container

For Seq to accurately measure available memory, depending on the hosting infrastructure, it's often necessary to specify memory limits for the container. If the Seq container exits unexpectedly, or fails with out-of-memory errors, specify the --memory and --memory-swap arguments to docker run:

docker run --memory=16g --memory-swap=16g <other args> datalust/seq

The argument to these flags is the total memory that the system should provide for the container (more is better). Normally, both flags should have the same value, effectively disabling swap for the container.

Managing cache memory

Memory in Seq is managed in a few layers:

  • The host memory limit. If Seq uses too much memory on the host it will risk being 'OOM-killed' by the OS.
    • The container memory limit. This value is specified through the --memory args to docker run. If this value isn't set then it will default to the host memory limit. If Seq uses more than this value it will probably be recycled by Docker.
      • The .NET GC heap limit. This value is specified through the COMPlus_GCHeapHardLimitPercent environment variable. If this value isn't set then it will default set to 97% of the container memory limit. If Seq uses more than this value it will start throwing OutOfMemory exceptions.
        • The cache target size. This value is specified through the cache.systemRamTarget configuration setting. If this value isn't set then it will default to between 70%-90% of the container memory limit. Seq will try keep its cache footprint as close as possible to the target and under the container memory limit. If Seq uses more than this value it will start dropping cache segments.

The default values should provide a stable environment with headroom for ingestion and query spikes, but they can be tuned for very large or very small instances.