Monday, March 19, 2012

High CPU utilization

Could anyone help me in finding out why the cpu utilization is very high?

I have two servers say, Server A , server B. There is a transactional replication going on from server A to B

There is a table say Table A on server A, which is being replicated to server B.

I created a trigger insert and update trigger on Table A on server B (i.e. on subscriber). Since then, the CPU utilization for server B is very high 80-90%

when i used profiler, i could see .whenever replication stored proc for insert or update executes..cpu utilization goes up..

trigger just insert the updated/inserted rows into some other table.

Could anyone tell me why the cpu utilization has gone up so much? i am using sql server 2005

thanx

If you see spiked CPU usage after adding the trigger, then it's obvious the trigger is the problem. Trigger does add overhead, how much depends on what the trigger does. Also, what was CPU utilization before trigger, 0%? 50%? Are you doing any queries inside the trigger? If so you may want to look at the plans to see if your queries are optimized, in profiler you should also be able to look at reads, writes, cpu, duration for each statement as well.

No comments:

Post a Comment