Skip to content
Weik.ioDocs
2026.2
Try Weik.io

Storage and its budget

Weik.io 2026.2

Size the hub's message storage with the disk budget, and set how many days the log, metric and trace stores keep their records.

On this page

The message server keeps the platform’s records within the disk budget you give init:

  • The events
  • The audit trail
  • The built versions of your integrations

Three stores beside the message server keep the telemetry, each within its caps and for the days you set in the installation settings. The Health page shows how much of each budget is reserved and stored, and how much room is left.

The disk budget#

--disk-budget caps the message server’s storage. The budget can be at most 80 % of the disk under that storage. The rest of the disk is for the message server’s other files and the margin of free space that the Health page checks, so the disk needs the budget and a quarter of it more.

The message server reserves the full size of every store against the budget when it creates the store:

What On one server On each data server of a hub on several servers
The installation’s stores About 10.2 GiB About 10.2 GiB
Each project 1 GiB 1 GiB
Each environment’s events 2 GiB 8 GiB
Each environment’s entity events 1 GiB 4 GiB
Each environment’s dead letters, delivery notices and record of handled events About 0.1 GiB About 0.5 GiB
Each environment in all About 3.1 GiB About 12.5 GiB

Each entity type a project declares in an environment also reserves space, at the size its policy sets or 128 MiB when the policy sets none. An environment’s entity types together stay within its entity-store budget.

On three data servers with --disk-budget 74GiB, three environments leave room for 26 projects of the default size, because 74 minus 10.2 minus 3 times 12.5 is 26.3. A budget of 149 GiB has room for 101 projects beside three environments.

A platform administrator gives a project another store size with --store-bytes on weikio project create or weikio project set. Flags of weikio env create and weikio env set change an environment’s budgets:

Flag What it does
--events-bytes Sets the budget of the environment’s events
--entity-events-bytes Sets the budget of the environment’s entity events
--dead-letter-bytes Sets the budget of the environment’s dead letters
--idempotency-bytes Sets the budget of the environment’s record of handled events

weikio platform health prints a line like this for each data server:

You see
data server 1   budget 74 GiB, 48 GiB reserved, 1.2 GiB stored, room for 26 more projects of 1 GiB, 71 GiB free of 93 GiB on the message store disk

Raise the budget#

Grow the disk first, by the increase in the budget and a quarter of that more. For example, to raise the budget of a single server from 40 GiB to 80 GiB, grow the tested disk of 160 GB to about 214 GB. Then run raise-budget.sh in the stack’s folder:

Terminal
$ sudo sh ./raise-budget.sh 80GiB
You see
Server 1 raised to 80 GiB. The hub's storage is 80 GiB.

The message server applies the new budget while it runs. A budget can only be raised. A size above 80 % of the disk fails with an error that has the largest budget the disk can take.

On a hub of several servers, the storage follows the smallest budget among its data servers. Grow each data server’s disk and run raise-budget.sh in its node directory. On each server but the last, the script prints that the storage keeps its size until the other servers are raised:

Terminal
$ sudo sh ./raise-budget.sh 149GiB
You see
Server 1 raised to 149 GiB. The hub's storage stays 74 GiB per server until servers 2 and 3 are raised.

On the last one, it prints the new size:

You see
Server 3 raised to 149 GiB. The hub's storage is 149 GiB per server.

The log, metric and trace stores#

The three stores run beside the backend, on node 1 of a hub of several servers. Each store keeps its records for a number of days and within a bound:

Store Kept by default Bound
victoria-logs, log lines 30 days WEIKIO_LOGS_MAX_DISK_SPACE_USAGE_BYTES, 30 GiB on a hub and 2 GiB on a stack written with --dev
victoria-metrics, metrics 90 days 300,000 new series an hour and 1,500,000 a day
victoria-traces, traces 7 days WEIKIO_TRACES_MAX_DISK_SPACE_USAGE_BYTES, 20 GiB on a hub and 2 GiB on a stack written with --dev

Past the series limits, the metric store discards the samples of new series. doctor warns when it does.

With their default caps, the stores use up to about 75 GB together.

Store Disk it uses
Logs About 50 to 90 bytes a line, so 30 days at 100 lines a second need about 15 to 25 GB
Traces About 600 bytes for each call through the gateway into an integration, so the default 20 GiB keeps 7 days up to about 59 such calls a second
Metrics About 5 GB for 90 days of 50 integrations, and 20 GB for 250

The log store’s default 30 GiB keeps 30 days up to about 140 to 250 lines a second. An integration that logs its message bodies uses more disk for each line.

When the log or the trace store reaches its cap, it deletes the oldest days first. The Health page and weikio platform health then show how many days it keeps. To change a cap, set its line in .env and run docker compose up -d. A line such as WEIKIO_LOGS_MAX_DISK_SPACE_USAGE_BYTES=64424509440 sets 60 GiB. A value of 0 sets no cap.

Set how long records stay#

Set how long each store keeps its records with weikio settings set, from 1d to 3650d for each store:

Terminal
$ weikio settings set --logs-retention 60d --metrics-retention 120d --traces-retention 14d

In the admin UI, you change the days with Edit installation settings in Settings › Platform › Installation. In Git, the days are the telemetryRetention block of the settings document, such as telemetryRetention: { logs: 60d, metrics: 90d, traces: 14d }.

The hub restarts each store whose days changed. While a store restarts, the backend keeps the telemetry the hub receives.

Shortening a retention erases, for good, each store’s records older than the new number of days. A longer retention erases nothing. Before it saves a shorter retention, the command prints what each store erases:

You see
Shortening logs from 60d to 30d erases 1,204,331 log lines from before 2026-09-27.

The command saves nothing until you confirm Save these settings?. Flags of weikio settings set skip the prompt:

Flag What it does
--dry-run Prints the lines and saves nothing
-y Saves without asking

weikio apply prints the same lines and prompt when a settings document shortens a store’s retention.

The Health page shows each store’s days as set and the days it runs with. When a store doesn’t run with the days set, the problem retention-not-applied shows the reason.

Memory of the stores#

Each store has a memory limit, so a heavy read, such as a week of traces on a busy hub, can’t use the memory the hub’s services run in. init sets each limit from the server’s memory, at least 512m each:

Limit Share of the server’s memory
WEIKIO_TRACES_MEMORY_LIMIT A quarter
WEIKIO_LOGS_MEMORY_LIMIT An eighth
WEIKIO_METRICS_MEMORY_LIMIT An eighth

A read that would need more fails. Narrow its time range on the Traces page or in weikio traces. To raise a limit, set a line such as WEIKIO_TRACES_MEMORY_LIMIT=4g in .env and run docker compose up -d.

Telemetry waiting at the hub#

While a store doesn’t accept telemetry, such as while it restarts, the backend keeps the telemetry on its data volume. As soon as the store accepts telemetry again, the backend writes the waiting telemetry to it. The telemetry keeps the times it arrived.

The backend keeps up to 8 GiB of waiting telemetry on its data volume, as long as at least a tenth of the disk under the volume stays free. At either limit, the backend accepts no new telemetry. The problem telemetry-waiting then turns to an error. Leave 8 GiB on that disk for the waiting telemetry, beyond the tenth that stays free. doctor shows what waits for each store.

The hub accepts telemetry batches of up to 8 MiB. You can set another size from 8MiB to 64MiB with weikio settings set --telemetry-batch-max-bytes 16MiB. Settings › Platform › Installation shows the size as Largest batch.

Backups leave out the three store volumes, because they keep telemetry and not the installation’s state. A hub restored on a new host starts the stores empty. The retention setting is in the archive, so the restored hub keeps records as long as the old one did.

Logs outside the stores#

Docker keeps the output of each container of the stack apart from the stores, in at most three files of 50 MB per container. The retention setting doesn’t change that.

An integration whose Log4j 2 or Logback configuration writes a log file keeps writing it. A file at a relative path lands in the deployment’s run folder on the agent’s host. The agent deletes that folder when the deployment leaves the agent. A file at another path stays until you remove it.

Sign in to the live demo

Sign in with the shared viewer account. It can open every screen of the example projects but can't change anything.

E-mail
viewer@demo.weik.io
Password
try-weikio-live-demo
Open the live demo