[OT] Windows file cache

This is not an EventStore problem per se, but affects running it on Windows.

It seems like Windows never releases cached memory. When running a full replay, or verification at startup (basically anything that causes the EventStore to read all chunks), a lot of memory is allocated and never released. On smaller customers we run SQL Server on the same machine, and it pretty much grinds to a halt. Clearing the windows file cache solves the problem right away. AFAIK the expected behaviour is for Windows to release the memory when another application requires it.

This problem has escalated in the last year, can’t recall it being an issue before, regardless of ES, SQL or Windows version.

Anyone else had this problem, and how did you solve it?

We’ve now scheduled a flush file cache tool to run multiple times every day on some servers…

/Peter

Awch… Maybe configure SQL Server to only reserve x% of the server’s memory, so that they’re not competing all the time?

This is windows file caching not ES. There are options you can use to bypass completely windows file caching (which is quite aggressive by default).

Is this CachedChunks? And/or ChunksCacheSize?

/Peter

no.

OK. To narrow it down: Is this setting in eventstore or windows?

Any chance someone has a link?

/Peter

Awch… Maybe configure SQL Server to only reserve x% of the server’s memory, so that they’re not competing all the time?

Most of them is SQL Express, so should never allocate more than 1 gb…

/Peter