Thursday, June 21, 2012

Difference between....

What is difference between database Mirroring and Replication

1. In Replication we can do object level copying where Mirroring is databse level.

2. There is no automatic fail over in Replication where as in Mirroring it is possible

3. We can maintain as many as subscription server in Replication in Mirroring there is only one primary server and one Mirror.

Difference between lazy writer and checkpoint ?
Lazy Writer
Lazy writer finds dirty pages in the buffer pool and write them to disk and drop out those pages from cache. It does this to keep certain amount of free pages available with in the buffer pool for data that may be requested by other queries.The pages that it writes out are 'older pages' , ones that haven't been used for a while.
If there are lot of available buffers, the lazy writer will be doing relatively little work and the number of pages written to disk will be quite low. If the lazy writer's consistently writing lot of data, it may indicate that there is memory bottleneck. In short lazy writer concentrates on clearing out older buffer pages.
Checkpoint
The checkpoint process also writes dirty pages to disk but there it has no interest in keeping available buffers or memory pressure.The job of the checkpoint is to keep the potential time needed to recover the database to a small value.

What is the difference between Checkpoint_duration and Recovery_interval ?
Checkpoint_duration is how long the checkpoint can run for. Recovery_interval affects how often it runs.
Using checkpoint duration to force the checkpoint to run in less time will increase IO, because it’s forcing the X amount of writes to be done in a shorter time than SQL would be default.
Using recovery interval to make the checkpoint run more often will reduce IO, because it has less to do each time it runs.

No comments:

Post a Comment