Impact of CDC on SQL Server
Hi,
We are testing performance impact of CDC on SQL Server.
There are two identical databases (KST_S001, KST_002) on SQL Server 2017 which is running in linux container. They both have CDC enabled for 180 tables and a data generator that is doing mostly updates on these tables.
The data generators are doing around 300k DML operations per minute on each database (600k total).
The configuration of CDC jobs is kept default (500 transactions, 5s polling interval for capture job, I think three days retention period on cleaning job)
The host machine is Azure Standard_E8-4as_v4: 4 vCPU, 64 GB RAM, 12800 IOPS, 128GB SSD.
After 1 hour of running the setup with CDC enabled, the average time of 1000 updates is 73ms.
With CDC disabled the average time of 1000 updates after 1 hour is 15ms.
I've attached two grafana screenshots showing the difference in metrics when the CDC is disabled versus enabled on these databases.
We are trying to understand the underlying mechanism that is contributing to the impact visible from the metrics.
Why is memory consumption so much higher?
Why do DML operations take longer with CDC enabled?
CDC disabled:
CDC enabled:
Thanks for answers and suggestions.
Peter