Scavenging when there are no deletes

Hello,

We have a system that is growing at a rate that isn’t obviously explained by the amount of events we send through the system. We do not delete any data so we haven’t run the scavenge process in the past. We ran it today and saw a significant reduction in disk use. I’m looking to understand more why that might be happening? Are there other optimizations that Scavenge does?

Thanks in advance.

Eventstore is creating streams all the time, and they seem to have things like maxCount etc set, so they would be truncated automatically.

There are stats events that produce the volume for deleted events, usually. There’s a new (not yet documented) setting WriteStatsToDb (true or false), which is true by default for V5 and is false by default in the next major version. If you set it to false, you’ll get much less noise with scavenging and also stop getting $stats events in subscriptions to $all, profit!

We will make sure it’s documented, but I’m afraid it will be done only in the new docs.

Thanks for the responses. We were a little alarmed when we saw a 91% reduction after running it for the first time in our dev environment.

That’s quite normal to get most of the events in the database to be stats events if you aren’t using Event Store actively.