Warning: Constant WP_TEMP_DIR already defined in /var/www/html/blogs/joe/wp-config.php on line 93

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/blogs/joe/wp-config.php:93) in /var/www/html/blogs/joe/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/blogs/joe/wp-config.php:93) in /var/www/html/blogs/joe/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/blogs/joe/wp-config.php:93) in /var/www/html/blogs/joe/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/blogs/joe/wp-config.php:93) in /var/www/html/blogs/joe/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/blogs/joe/wp-config.php:93) in /var/www/html/blogs/joe/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/blogs/joe/wp-config.php:93) in /var/www/html/blogs/joe/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/blogs/joe/wp-config.php:93) in /var/www/html/blogs/joe/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/blogs/joe/wp-config.php:93) in /var/www/html/blogs/joe/wp-includes/rest-api/class-wp-rest-server.php on line 1902
{"id":508,"date":"2012-02-15T06:25:00","date_gmt":"2012-02-15T06:25:00","guid":{"rendered":"\/blogs\/joe\/post\/What-are-the-Replication-Agents-waiting-for-Accumulating-wait-stats-by-agent-session.aspx"},"modified":"2013-01-02T20:36:29","modified_gmt":"2013-01-03T04:36:29","slug":"what-are-the-replication-agents-waiting-on-accumulating-wait-stats-by-agent-session","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/joe\/what-are-the-replication-agents-waiting-on-accumulating-wait-stats-by-agent-session\/","title":{"rendered":"What are the Replication Agents waiting on? Accumulating wait stats by agent session"},"content":{"rendered":"

\nConsider the following scenario:<\/font><\/font>\n<\/p>\n

\n·<\/font><\/font>        <\/font><\/font><\/span><\/span><\/span>You have Transactional Replication deployed <\/font><\/font>\n<\/p>\n

\n·<\/font><\/font>        <\/font><\/font><\/span><\/span><\/span>Data is flowing, but just not as fast as you would like <\/font><\/font>\n<\/p>\n

\n·<\/font><\/font>        <\/font><\/font><\/span><\/span><\/span>This scenario could apply to local\/remote distributors and push\/pull subscribers<\/font><\/font>\n<\/p>\n

\nThere are several different techniques we can use to narrow down where the replication performance issue is happening.  <\/span>Perhaps you’ve already found that the performance issue is happening for log reader reads or distribution database writes.  <\/span>Or perhaps you suspect the issue is on the subscriber?<\/font>  <\/font><\/span><\/font>\n<\/p>\n

\nWhile the various replication techniques can help us narrow down the lagging member of the topology, I still would like more visibility into why a particular agent read or write process is performing more slowly.  <\/span>Fortunately, you can do this in SQL Server 2008+…<\/font><\/font>\n<\/p>\n

\nIn the following example, I’ll start by retrieving the session IDs of the log reader and distribution agents (and as an aside my replication topology is SQL Server instance version 10.50.2500):<\/font><\/font>\n<\/p>\n

\n— Log Reader<\/font><\/font><\/span><\/span>\n<\/p>\n

\nSELECT<\/font><\/font><\/span> <\/span>session_id<\/font><\/span>,<\/font><\/span> program_name<\/font><\/span><\/font>,<\/font><\/span><\/span><\/font>\n<\/p>\n

\n             <\/font><\/span>reads<\/font><\/span><\/font>,<\/font><\/span><\/font><\/span>\n<\/p>\n

\n             <\/font><\/span>writes<\/font><\/span><\/font>,<\/font><\/span><\/font><\/span>\n<\/p>\n

\n             <\/font><\/span>logical_reads<\/font><\/span><\/font><\/span>\n<\/p>\n

\nFROM<\/font><\/font><\/span> sys<\/font><\/span>.<\/font><\/span><\/font>dm_exec_sessions<\/font><\/span><\/span><\/font>\n<\/p>\n

\nWHERE<\/font><\/font><\/span> original_login_name<\/font><\/span> =<\/font><\/span> <\/font><\/span><\/font>\n<\/p>\n

\n       <\/font><\/span>'SQLSKILLS\\SQLskillsLogReaderAG'<\/font><\/span><\/font>;<\/font><\/span><\/font><\/span>\n<\/p>\n

\n<\/font><\/font><\/span>\n<\/p>\n

\n— Distribution Agent<\/font><\/font><\/span><\/span>\n<\/p>\n

\nSELECT<\/font><\/font><\/span> <\/span>session_id<\/font><\/span>,<\/font><\/span> program_name<\/font><\/span><\/font>,<\/font><\/span><\/span><\/font>\n<\/p>\n

\n             <\/font><\/span>reads<\/font><\/span><\/font>,<\/font><\/span><\/font><\/span>\n<\/p>\n

\n             <\/font><\/span>writes<\/font><\/span><\/font>,<\/font><\/span><\/font><\/span>\n<\/p>\n

\n             <\/font><\/span>logical_reads<\/font><\/span><\/font><\/span>\n<\/p>\n

\nFROM<\/font><\/font><\/span> sys<\/font><\/span>.<\/font><\/span><\/font>dm_exec_sessions<\/font><\/span><\/span><\/font>\n<\/p>\n

\nWHERE<\/font><\/font><\/span> original_login_name<\/font><\/span> =<\/font><\/span> <\/font><\/span><\/font>\n<\/p>\n

\n       <\/font><\/span>'SQLSKILLS\\SQLskillsDistAGT'<\/font><\/span><\/font>;<\/font><\/span><\/font><\/span>\n<\/p>\n

\n<\/font><\/font>\n<\/p>\n

\nIn this example I’m using separate accounts to run the agent executables, however I could have also added a predicate on program_name based on the publication I was interested in evaluating.  <\/span>For example, I could have said for the Log Reader agent – program_name = ‘Repl-LogReader-0-AdventureWorks2008R2-6’<\/em> and for the Distribution agent – that’s more interesting, as we have program_name = ‘CAESAR-AdventureWorks2008R2-Pub_AW_2008R2-AUGUSTUS-1’<\/em> (subscriber is AUGUSTUS, publisher is CAESAR).  <\/span>But if you just used that program name, you won’t get Replication Distribution History session, which would be program_name = ‘Replication Distribution History’<\/em> and may also be interesting.<\/font><\/font>\n<\/p>\n

\nSo in my example, I have 5 different sessions I’m interested in (and yours will vary based on the number of published databases, independent agents, server role, etc):<\/font><\/font>\n<\/p>\n

\n·<\/font><\/font>        <\/font><\/font><\/span><\/span><\/span>The log reader agent was using sessions 55, 57, 59<\/font><\/font>\n<\/p>\n

\n·<\/font><\/font>        <\/font><\/font><\/span><\/span><\/span>The distribution agent had two sessions (61 for history and 62 for the executable)<\/font><\/font>\n<\/p>\n

\nNow that I have my session ids, I’m going to create an extended events session that I can run during the “slow performing” period to help illuminate where to investigate next (and for more general discussion on this technique, see Paul Randal’s post “<\/font><\/font>Capturing wait stats for a single operation<\/a><\/font><\/font>”):<\/font><\/font>\n<\/p>\n

\nCREATE<\/font><\/font><\/span> EVENT<\/font><\/span> SESSION<\/font><\/span> Replication_AGT_Waits<\/font><\/span> <\/font><\/span><\/font>\n<\/p>\n

\nON<\/font><\/font><\/span> SERVER<\/font><\/span> <\/font><\/span><\/font>\n<\/p>\n

\nADD<\/font><\/font><\/span> EVENT<\/font><\/span> sqlos<\/font><\/span>.<\/font><\/span>wait_info<\/font><\/span><\/font>(<\/font><\/span><\/span><\/font>\n<\/p>\n

\n       <\/font><\/span>ACTION <\/font><\/span>(<\/font><\/span>sqlserver<\/font><\/span>.<\/font><\/span>session_id<\/font><\/span><\/font>)<\/font><\/span><\/font><\/span>\n<\/p>\n

\n    <\/font><\/span>WHERE <\/font><\/span>(<\/font><\/span>[package0]<\/font><\/span>.<\/font><\/span>[equal_uint64]<\/font><\/span>(<\/font><\/span>[sqlserver]<\/font><\/span>.<\/font><\/span>[session_id]<\/font><\/span>,(<\/font><\/span>55))<\/font><\/span> OR<\/font><\/span> [package0]<\/font><\/span>.<\/font><\/span>[equal_uint64]<\/font><\/span>(<\/font><\/span>[sqlserver]<\/font><\/span>.<\/font><\/span>[session_id]<\/font><\/span>,(<\/font><\/span>57))<\/font><\/span> OR<\/font><\/span> [package0]<\/font><\/span>.<\/font><\/span>[equal_uint64]<\/font><\/span>(<\/font><\/span>[sqlserver]<\/font><\/span>.<\/font><\/span>[session_id]<\/font><\/span>,(<\/font><\/span>59))<\/font><\/span> OR<\/font><\/span> [package0]<\/font><\/span>.<\/font><\/span>[equal_uint64]<\/font><\/span>(<\/font><\/span>[sqlserver]<\/font><\/span>.<\/font><\/span>[session_id]<\/font><\/span>,(<\/font><\/span>61))<\/font><\/span> OR<\/font><\/span> [package0]<\/font><\/span>.<\/font><\/span>[equal_uint64]<\/font><\/span>(<\/font><\/span>[sqlserver]<\/font><\/span>.<\/font><\/span>[session_id]<\/font><\/span>,(<\/font><\/span>62<\/font>)))),<\/font><\/span><\/font><\/span>\n<\/p>\n

\nADD<\/font><\/font><\/span> EVENT<\/font><\/span> sqlos<\/font><\/span>.<\/font><\/span>wait_info_external<\/font><\/span><\/font>(<\/font><\/span><\/span><\/font>\n<\/p>\n

\n       <\/font><\/span>ACTION <\/font><\/span>(<\/font><\/span>sqlserver<\/font><\/span>.<\/font><\/span>session_id<\/font><\/span><\/font>)<\/font><\/span><\/font><\/span>\n<\/p>\n

\n    <\/font><\/span>WHERE <\/font><\/span>(<\/font><\/span>[package0]<\/font><\/span>.<\/font><\/span>[equal_uint64]<\/font><\/span>(<\/font><\/span>[sqlserver]<\/font><\/span>.<\/font><\/span>[session_id]<\/font><\/span>,(<\/font><\/span>55))<\/font><\/span> OR<\/font><\/span> [package0]<\/font><\/span>.<\/font><\/span>[equal_uint64]<\/font><\/span>(<\/font><\/span>[sqlserver]<\/font><\/span>.<\/font><\/span>[session_id]<\/font><\/span>,(<\/font><\/span>57))<\/font><\/span> OR<\/font><\/span> [package0]<\/font><\/span>.<\/font><\/span>[equal_uint64]<\/font><\/span>(<\/font><\/span>[sqlserver]<\/font><\/span>.<\/font><\/span>[session_id]<\/font><\/span>,(<\/font><\/span>59))<\/font><\/span> OR<\/font><\/span> [package0]<\/font><\/span>.<\/font><\/span>[equal_uint64]<\/font><\/span>(<\/font><\/span>[sqlserver]<\/font><\/span>.<\/font><\/span>[session_id]<\/font><\/span>,(<\/font><\/span>61))<\/font><\/span> OR<\/font><\/span> [package0]<\/font><\/span>.<\/font><\/span>[equal_uint64]<\/font><\/span>(<\/font><\/span>[sqlserver]<\/font><\/span>.<\/font><\/span>[session_id]<\/font><\/span>,(<\/font><\/span>62<\/font>))))<\/font><\/span><\/font><\/span>\n<\/p>\n

\nADD<\/font><\/font><\/span> TARGET<\/font><\/span> package0<\/font><\/span>.<\/font><\/span><\/font>asynchronous_file_target<\/font><\/span><\/span><\/font>\n<\/p>\n

\n       <\/font><\/font><\/span><\/span>(<\/font><\/span>SET<\/font><\/span><\/font> FILENAME<\/font><\/span> =<\/font><\/span> N'C:\\temp\\ReplAGTStats.xel'<\/font><\/span><\/font>,<\/font><\/span><\/span><\/font>\n<\/p>\n

\n       <\/font><\/span> <\/span>METADATAFILE<\/font><\/span> =<\/font><\/span> N'C:\\temp\\ReplAGTStats.xem'<\/font><\/span><\/font>)<\/font><\/span><\/font><\/span>\n<\/p>\n

\nGO<\/font><\/font><\/span>\n<\/p>\n

\n<\/font><\/font>\n<\/p>\n

\nAfter creating the session, I’ll start.  <\/span>In my test, I just ran the slow performing workload against one of the published tables, launched Replication Monitor, waited for the rows to arrive at the subscriber and then stopped the event session:<\/font><\/font>\n<\/p>\n

\nALTER<\/font><\/font><\/span> EVENT<\/font><\/span> SESSION<\/font><\/span> Replication_AGT_Waits<\/font><\/span> <\/font><\/span><\/font>\n<\/p>\n

\nON<\/font><\/font><\/span> SERVER<\/font><\/span> STATE<\/font><\/span> =<\/font><\/span> START<\/font><\/span><\/font>;<\/font><\/span><\/span><\/font>\n<\/p>\n

\n<\/font><\/font><\/span>\n<\/p>\n

\n— Run representative replication workload against publisher<\/font><\/font><\/span>\n<\/p>\n

\n<\/font><\/font><\/span>\n<\/p>\n

\n— Launch Monitor and wait for all trans to be fully distributed<\/font><\/font><\/span><\/span>\n<\/p>\n

\n<\/font><\/font><\/span>\n<\/p>\n

\nALTER<\/font><\/font><\/span> EVENT<\/font><\/span> SESSION<\/font><\/span> Replication_AGT_Waits<\/font><\/span> <\/font><\/span><\/font>\n<\/p>\n

\nON<\/font><\/font><\/span> SERVER<\/font><\/span> STATE<\/font><\/span> =<\/font><\/span> STOP<\/font><\/span><\/font>;<\/font><\/span><\/span><\/font>\n<\/p>\n

\n<\/font><\/font>\n<\/p>\n

\nNext, I created two intermediate temp tables to start going through the collected data:<\/font><\/font>\n<\/p>\n

\n— Raw data into intermediate table<\/font><\/font><\/span><\/span>\n<\/p>\n

\nSELECT<\/font><\/font><\/span> CAST<\/font><\/span>(<\/font><\/span>event_data<\/font><\/span> as<\/font><\/span> XML<\/font><\/span>)<\/font><\/span> <\/font>event_data<\/font><\/span><\/span><\/font>\n<\/p>\n

\nINTO<\/font><\/font><\/span> <\/font>#ReplicationAgentWaits_Stage_1<\/font><\/span><\/span><\/font>\n<\/p>\n

\nFROM<\/font><\/font><\/span> sys<\/font><\/span>.<\/font><\/span><\/font>fn_xe_file_target_read_file<\/font><\/span><\/span><\/font>\n<\/p>\n

\n             <\/font><\/font><\/span><\/span>(<\/font><\/span>'C:\\temp\\ReplAGTStats*.xel'<\/font><\/span><\/font>,<\/font><\/span><\/font><\/span>\n<\/p>\n

\n             <\/font><\/span> <\/span>'C:\\temp\\ReplAGTStats*.xem'<\/font><\/span><\/font>,<\/font><\/span><\/font><\/span>\n<\/p>\n

\n             <\/font><\/span> <\/span>NULL,<\/font><\/span> <\/font>NULL)<\/font><\/span><\/font><\/span>\n<\/p>\n

\n<\/font><\/font><\/span>\n<\/p>\n

\n— Aggregated data into intermediate table<\/font><\/font><\/span><\/span>\n<\/p>\n

\n— #ReplicationAgentWaits<\/font>        <\/font><\/span><\/font><\/font><\/span><\/span>\n<\/p>\n

\nSELECT<\/font><\/font><\/span> <\/font><\/span><\/font>\n<\/p>\n

\n       <\/font><\/span>event_data<\/font><\/span>.<\/font><\/span>value<\/font><\/span> <\/font><\/font><\/span>\n<\/p>\n

\n       <\/font><\/font><\/span><\/span>(<\/font><\/span>'(\/event\/action[@name=''session_id'']\/value)[1]'<\/font><\/span>,<\/font><\/span><\/font> 'smallint'<\/font><\/span>)<\/font><\/span> as<\/font><\/span> session_id<\/font><\/span><\/font>,<\/font><\/span><\/span><\/font>\n<\/p>\n

\n       <\/font><\/span>event_data<\/font><\/span>.<\/font><\/span>value<\/font><\/span> <\/font><\/font><\/span>\n<\/p>\n

\n       <\/font><\/font><\/span><\/span>(<\/font><\/span>'(\/event\/data[@name=''wait_type'']\/text)[1]'<\/font><\/span>,<\/font><\/span><\/font> 'varchar(100)'<\/font><\/span>)<\/font><\/span> as<\/font><\/span> wait_type<\/font><\/span><\/font>,<\/font><\/span><\/span><\/font>\n<\/p>\n

\n       <\/font><\/span>event_data<\/font><\/span>.<\/font><\/span>value<\/font><\/span> <\/font><\/font><\/span>\n<\/p>\n

\n       <\/font><\/font><\/span><\/span>(<\/font><\/span>'(\/event\/data[@name=''duration'']\/value)[1]'<\/font><\/span>,<\/font><\/span><\/font> 'bigint'<\/font><\/span>)<\/font><\/span> as<\/font><\/span> duration<\/font><\/span><\/font>,<\/font><\/span><\/span><\/font>\n<\/p>\n

\n       <\/font><\/span>event_data<\/font><\/span>.<\/font><\/span>value<\/font><\/span> <\/font><\/font><\/span>\n<\/p>\n

\n       <\/font><\/font><\/span><\/span>(<\/font><\/span>'(\/event\/data[@name=''signal_duration'']\/value)[1]'<\/font><\/span>,<\/font><\/span><\/font> 'bigint'<\/font><\/span>)<\/font><\/span> as<\/font><\/span> signal_duration<\/font><\/span><\/font>,<\/font><\/span><\/span><\/font>\n<\/p>\n

\n       <\/font><\/span>event_data<\/font><\/span>.<\/font><\/span>value<\/font><\/span> <\/font><\/font><\/span>\n<\/p>\n

\n       <\/font><\/font><\/span><\/span>(<\/font><\/span>'(\/event\/data[@name=''completed_count'']\/value)[1]'<\/font><\/span>,<\/font><\/span><\/font> 'bigint'<\/font><\/span>)<\/font><\/span> as<\/font><\/span> <\/font>completed_count<\/font><\/span><\/span><\/font>\n<\/p>\n

\nINTO<\/font><\/font><\/span> <\/font>#ReplicationAgentWaits_Stage_2<\/font><\/span><\/span><\/font>\n<\/p>\n

\nFROM<\/font><\/font><\/span> #ReplicationAgentWaits_Stage_1<\/font><\/span><\/font>;<\/font><\/span><\/span><\/font>\n<\/p>\n

\n<\/font><\/font>\n<\/p>\n

\nThen I took a look at how things broke out by session_id:<\/font><\/font>\n<\/p>\n

\nSELECT<\/font><\/font><\/span> <\/span>session_id<\/font><\/span><\/font>,<\/font><\/span><\/span><\/font>\n<\/p>\n

\n             <\/font><\/span>wait_type<\/font><\/span><\/font>,<\/font><\/span><\/font><\/span>\n<\/p>\n

\n             <\/font><\/span>SUM<\/font><\/span>(<\/font><\/span>duration<\/font><\/span>)<\/font><\/span> total_duration<\/font><\/span><\/font>,<\/font><\/span><\/font><\/span>\n<\/p>\n

\n             <\/font><\/span>SUM<\/font><\/span>(<\/font><\/span>signal_duration<\/font><\/span>)<\/font><\/span> total_signal_duration<\/font><\/span><\/font>,<\/font><\/span><\/font><\/span>\n<\/p>\n

\n             <\/font><\/span>SUM<\/font><\/span>(<\/font><\/span>completed_count<\/font><\/span>)<\/font><\/span> <\/font>total_wait_count<\/font><\/span><\/font><\/span>\n<\/p>\n

\nFROM<\/font><\/font><\/span> <\/font>#ReplicationAgentWaits_Stage_2<\/font><\/span><\/span><\/font>\n<\/p>\n

\nGROUP<\/font><\/font><\/span> BY<\/font><\/span> session_id<\/font><\/span><\/font>,<\/font><\/span><\/span><\/font>\n<\/p>\n

\n             <\/font><\/span>wait_type<\/font><\/span><\/font><\/span>\n<\/p>\n

\nORDER<\/font><\/font><\/span> BY<\/font><\/span> session_id<\/font><\/span><\/font>,<\/font><\/span><\/span><\/font>\n<\/p>\n

\n             <\/font><\/span>SUM<\/font><\/span>(<\/font><\/span>duration<\/font><\/span>)<\/font><\/span> DESC<\/font><\/span><\/font>;<\/font><\/span><\/font><\/span>\n<\/p>\n

\n<\/font><\/font>\n<\/p>\n

\nHere were the results:<\/font><\/font>\n<\/p>\n

\n\"clip_image002\"<\/a><\/span>\n<\/p>\n

\nSession 55, 57 and 59 were my log agent sessions.  <\/span>Just looking at session 57 (highlighted in purple), we see that IO_COMPLETION had the highest wait duration.  <\/span>If I check out the accumulated reads from sys.dm_exec_sessions for that session, I see it is doing all <\/em>reads, whereas session 59 was doing all <\/em>writes (so we can start mapping to the agent thread roles).<\/font>  <\/font><\/span><\/font>\n<\/p>\n

\nSession id 61 (in yellow) represented the Replication Distribution History process and session id 62 (in green) represented the distribution agent process.  <\/span>As we can see for 62 – the longest duration was due to NETWORK_IO.  <\/span>We also see a similar value from PREEMPTIVE_OS_WAITFORSINGLEOBJECT (and if you think that these seem correlated, indeed this preemptive wait type is seen in conjunction with the network waittype wait).<\/font><\/font>\n<\/p>\n

\nSo what would we see at the subscriber side?  <\/span>For this specific scenario, I saw the following (using the session of my distribution agent account) which was session id 55:<\/font><\/font>\n<\/p>\n

\n\"clip_image003\"<\/a><\/span>\n<\/p>\n

\n<\/font><\/font>\n<\/p>\n

\nIn this case, the top wait (by duration) was WRITELOG on the subscriber for the CAESAR_AdventureWorks2008R2_Pub_AW_2008R2 distribution agent process – although the number was not very high.<\/font><\/font>\n<\/p>\n

\nSo if you’re experiencing slow replication, you may consider this additional technique in order to help further identify where the bottlenecks may be in the topology and also get initial ideas on why this may be.<\/font>  <\/font><\/span><\/font><\/p>\n","protected":false},"excerpt":{"rendered":"

Consider the following scenario: ·        You have Transactional Replication deployed ·        Data is flowing, but just not as fast as you would like ·        This scenario could apply to local\/remote distributors and push\/pull subscribers There are several different techniques we can use to narrow down where the replication performance issue is happening.  Perhaps you’ve already […]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28,30],"tags":[],"class_list":["post-508","post","type-post","status-publish","format-standard","hentry","category-performance","category-replication"],"yoast_head":"\nWhat are the Replication Agents waiting on? Accumulating wait stats by agent session - Joe Sack<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sqlskills.com\/blogs\/joe\/what-are-the-replication-agents-waiting-on-accumulating-wait-stats-by-agent-session\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What are the Replication Agents waiting on? Accumulating wait stats by agent session - Joe Sack\" \/>\n<meta property=\"og:description\" content=\"Consider the following scenario: ·        You have Transactional Replication deployed ·        Data is flowing, but just not as fast as you would like ·        This scenario could apply to local\/remote distributors and push\/pull subscribers There are several different techniques we can use to narrow down where the replication performance issue is happening.  Perhaps you’ve already […]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/joe\/what-are-the-replication-agents-waiting-on-accumulating-wait-stats-by-agent-session\/\" \/>\n<meta property=\"og:site_name\" content=\"Joe Sack\" \/>\n<meta property=\"article:published_time\" content=\"2012-02-15T06:25:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-01-03T04:36:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-content\/uploads\/windows-live-writer\/what-are-the-replication-agents-waiting-\/209aa596\/clip_image002_thumb.jpg\" \/>\n<meta name=\"author\" content=\"Joseph Sack\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Joseph Sack\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/what-are-the-replication-agents-waiting-on-accumulating-wait-stats-by-agent-session\/\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/what-are-the-replication-agents-waiting-on-accumulating-wait-stats-by-agent-session\/\",\"name\":\"What are the Replication Agents waiting on? Accumulating wait stats by agent session - Joe Sack\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/#website\"},\"datePublished\":\"2012-02-15T06:25:00+00:00\",\"dateModified\":\"2013-01-03T04:36:29+00:00\",\"author\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/#\/schema\/person\/533eb0113a15fb5a6e8067a49e4ae648\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/what-are-the-replication-agents-waiting-on-accumulating-wait-stats-by-agent-session\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlskills.com\/blogs\/joe\/what-are-the-replication-agents-waiting-on-accumulating-wait-stats-by-agent-session\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/what-are-the-replication-agents-waiting-on-accumulating-wait-stats-by-agent-session\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Performance\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/category\/performance\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"What are the Replication Agents waiting on? Accumulating wait stats by agent session\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/#website\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/\",\"name\":\"Joe Sack\",\"description\":\"SQL Server Performance Tuning, High Availability and Disaster Recovery Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/#\/schema\/person\/533eb0113a15fb5a6e8067a49e4ae648\",\"name\":\"Joseph Sack\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a4b39a7719a6bfff1add3ec00527810734579ee114d6d983e8e68f937b77be96?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a4b39a7719a6bfff1add3ec00527810734579ee114d6d983e8e68f937b77be96?s=96&d=mm&r=g\",\"caption\":\"Joseph Sack\"},\"description\":\"Joe Sack is a Principal Consultant with SQLskills. He has worked as a SQL Server professional since 1997 and has supported and developed for SQL Server environments in financial services, IT consulting, manufacturing, retail and the real estate industry. Prior to joining SQLskills he worked at Microsoft as a Premier Field Engineer supporting very large enterprise customer environments. He was responsible for providing deep SQL Server advisory services, training, troubleshooting and ongoing solutions guidance. His areas of expertise include performance tuning, scalability, T-SQL development and high-availability. In 2006 Joe earned the \u201cMicrosoft Certified Master: SQL Server 2005\u201d certification and in 2008 he earned the \u201cMicrosoft Certified Master: SQL Server 2008\u201d certification. In 2009 he took over responsibility for the entire SQL Server Microsoft Certified Master program and held that post until 2011. He was given the SQL Server MVP award in 2013.\",\"sameAs\":[\"http:\/\/3.209.169.194\/blogs\/joe\",\"https:\/\/twitter.com\/https:\/\/twitter.com\/josephsack\"],\"url\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/author\/joe\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What are the Replication Agents waiting on? Accumulating wait stats by agent session - Joe Sack","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sqlskills.com\/blogs\/joe\/what-are-the-replication-agents-waiting-on-accumulating-wait-stats-by-agent-session\/","og_locale":"en_US","og_type":"article","og_title":"What are the Replication Agents waiting on? Accumulating wait stats by agent session - Joe Sack","og_description":"Consider the following scenario: ·        You have Transactional Replication deployed ·        Data is flowing, but just not as fast as you would like ·        This scenario could apply to local\/remote distributors and push\/pull subscribers There are several different techniques we can use to narrow down where the replication performance issue is happening.  Perhaps you’ve already […]","og_url":"https:\/\/www.sqlskills.com\/blogs\/joe\/what-are-the-replication-agents-waiting-on-accumulating-wait-stats-by-agent-session\/","og_site_name":"Joe Sack","article_published_time":"2012-02-15T06:25:00+00:00","article_modified_time":"2013-01-03T04:36:29+00:00","og_image":[{"url":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-content\/uploads\/windows-live-writer\/what-are-the-replication-agents-waiting-\/209aa596\/clip_image002_thumb.jpg"}],"author":"Joseph Sack","twitter_misc":{"Written by":"Joseph Sack","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/joe\/what-are-the-replication-agents-waiting-on-accumulating-wait-stats-by-agent-session\/","url":"https:\/\/www.sqlskills.com\/blogs\/joe\/what-are-the-replication-agents-waiting-on-accumulating-wait-stats-by-agent-session\/","name":"What are the Replication Agents waiting on? Accumulating wait stats by agent session - Joe Sack","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/joe\/#website"},"datePublished":"2012-02-15T06:25:00+00:00","dateModified":"2013-01-03T04:36:29+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/joe\/#\/schema\/person\/533eb0113a15fb5a6e8067a49e4ae648"},"breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/joe\/what-are-the-replication-agents-waiting-on-accumulating-wait-stats-by-agent-session\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/joe\/what-are-the-replication-agents-waiting-on-accumulating-wait-stats-by-agent-session\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/joe\/what-are-the-replication-agents-waiting-on-accumulating-wait-stats-by-agent-session\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/joe\/"},{"@type":"ListItem","position":2,"name":"Performance","item":"https:\/\/www.sqlskills.com\/blogs\/joe\/category\/performance\/"},{"@type":"ListItem","position":3,"name":"What are the Replication Agents waiting on? Accumulating wait stats by agent session"}]},{"@type":"WebSite","@id":"https:\/\/www.sqlskills.com\/blogs\/joe\/#website","url":"https:\/\/www.sqlskills.com\/blogs\/joe\/","name":"Joe Sack","description":"SQL Server Performance Tuning, High Availability and Disaster Recovery Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqlskills.com\/blogs\/joe\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.sqlskills.com\/blogs\/joe\/#\/schema\/person\/533eb0113a15fb5a6e8067a49e4ae648","name":"Joseph Sack","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlskills.com\/blogs\/joe\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a4b39a7719a6bfff1add3ec00527810734579ee114d6d983e8e68f937b77be96?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a4b39a7719a6bfff1add3ec00527810734579ee114d6d983e8e68f937b77be96?s=96&d=mm&r=g","caption":"Joseph Sack"},"description":"Joe Sack is a Principal Consultant with SQLskills. He has worked as a SQL Server professional since 1997 and has supported and developed for SQL Server environments in financial services, IT consulting, manufacturing, retail and the real estate industry. Prior to joining SQLskills he worked at Microsoft as a Premier Field Engineer supporting very large enterprise customer environments. He was responsible for providing deep SQL Server advisory services, training, troubleshooting and ongoing solutions guidance. His areas of expertise include performance tuning, scalability, T-SQL development and high-availability. In 2006 Joe earned the \u201cMicrosoft Certified Master: SQL Server 2005\u201d certification and in 2008 he earned the \u201cMicrosoft Certified Master: SQL Server 2008\u201d certification. In 2009 he took over responsibility for the entire SQL Server Microsoft Certified Master program and held that post until 2011. He was given the SQL Server MVP award in 2013.","sameAs":["http:\/\/3.209.169.194\/blogs\/joe","https:\/\/twitter.com\/https:\/\/twitter.com\/josephsack"],"url":"https:\/\/www.sqlskills.com\/blogs\/joe\/author\/joe\/"}]}},"_links":{"self":[{"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/posts\/508","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/comments?post=508"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/posts\/508\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/media?parent=508"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/categories?post=508"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/tags?post=508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}