<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: SQL*Net message to client vs SQL*Net more data to client</title>
	<atom:link href="http://blog.tanelpoder.com/2008/02/10/sqlnet-message-to-client-vs-sqlnet-more-data-to-client/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tanelpoder.com/2008/02/10/sqlnet-message-to-client-vs-sqlnet-more-data-to-client/</link>
	<description>Oracle troubleshooting, internals and performance tuning</description>
	<lastBuildDate>Wed, 10 Mar 2010 08:52:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Eduardo Legatti</title>
		<link>http://blog.tanelpoder.com/2008/02/10/sqlnet-message-to-client-vs-sqlnet-more-data-to-client/comment-page-1/#comment-1590</link>
		<dc:creator>Eduardo Legatti</dc:creator>
		<pubDate>Mon, 18 May 2009 14:23:51 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/02/10/sqlnet-message-to-client-vs-sqlnet-more-data-to-client/#comment-1590</guid>
		<description>Hi Tanel,

I only got acceptable export speed when I changed the default buffer size to a high value:

exp user/password buffer=100000000

So, do you think there is some O/S kernel related parameter that I should to review?

Cheers</description>
		<content:encoded><![CDATA[<p>Hi Tanel,</p>
<p>I only got acceptable export speed when I changed the default buffer size to a high value:</p>
<p>exp user/password buffer=100000000</p>
<p>So, do you think there is some O/S kernel related parameter that I should to review?</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eduardo Legatti</title>
		<link>http://blog.tanelpoder.com/2008/02/10/sqlnet-message-to-client-vs-sqlnet-more-data-to-client/comment-page-1/#comment-1583</link>
		<dc:creator>Eduardo Legatti</dc:creator>
		<pubDate>Sat, 16 May 2009 14:10:59 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/02/10/sqlnet-message-to-client-vs-sqlnet-more-data-to-client/#comment-1583</guid>
		<description>Hi Tanel,

Thanks for the tips, I&#039;ll check it out ...

Cheers</description>
		<content:encoded><![CDATA[<p>Hi Tanel,</p>
<p>Thanks for the tips, I&#8217;ll check it out &#8230;</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tanel Poder</title>
		<link>http://blog.tanelpoder.com/2008/02/10/sqlnet-message-to-client-vs-sqlnet-more-data-to-client/comment-page-1/#comment-1581</link>
		<dc:creator>Tanel Poder</dc:creator>
		<pubDate>Sat, 16 May 2009 08:36:42 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/02/10/sqlnet-message-to-client-vs-sqlnet-more-data-to-client/#comment-1581</guid>
		<description>While doing your test, also run &quot;tnsping DBNAME 999&quot; so you&#039;d get some latency figures (for small packets)

If you think that everything is configured normally, there is no significant network latency nor application think time then you can look deeper - dump the network packets at client with tcpdump (if on linux) and analyze part of the transmission with Wireshark (www.wireshark.org). This will give you SDU/TDU sizes, resends, packet reassemblies and timestamps you need for finding where the time is going IF it&#039;s a network transport issue.</description>
		<content:encoded><![CDATA[<p>While doing your test, also run &#8220;tnsping DBNAME 999&#8243; so you&#8217;d get some latency figures (for small packets)</p>
<p>If you think that everything is configured normally, there is no significant network latency nor application think time then you can look deeper &#8211; dump the network packets at client with tcpdump (if on linux) and analyze part of the transmission with Wireshark (www.wireshark.org). This will give you SDU/TDU sizes, resends, packet reassemblies and timestamps you need for finding where the time is going IF it&#8217;s a network transport issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tanel Poder</title>
		<link>http://blog.tanelpoder.com/2008/02/10/sqlnet-message-to-client-vs-sqlnet-more-data-to-client/comment-page-1/#comment-1580</link>
		<dc:creator>Tanel Poder</dc:creator>
		<pubDate>Sat, 16 May 2009 08:32:40 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/02/10/sqlnet-message-to-client-vs-sqlnet-more-data-to-client/#comment-1580</guid>
		<description>Btw, some misconfigured VLANs can driver up latency even in local area networks.</description>
		<content:encoded><![CDATA[<p>Btw, some misconfigured VLANs can driver up latency even in local area networks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tanel Poder</title>
		<link>http://blog.tanelpoder.com/2008/02/10/sqlnet-message-to-client-vs-sqlnet-more-data-to-client/comment-page-1/#comment-1579</link>
		<dc:creator>Tanel Poder</dc:creator>
		<pubDate>Sat, 16 May 2009 08:32:04 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/02/10/sqlnet-message-to-client-vs-sqlnet-more-data-to-client/#comment-1579</guid>
		<description>I don&#039;t know what numbers do you normally see but the numbers you sent earlier show that your exp had done 26000 sqlnet roundtrips which on average took over 10ms each. Note that the sql*net messasge from client wait time includes the following:

1) time the result network packets are &quot;flying&quot; towards the client
2) client application think time - this is important as if you use some pipe for compression on the fly, the think time may become even longer
3) time the next request packet is &quot;flying&quot; towards the server</description>
		<content:encoded><![CDATA[<p>I don&#8217;t know what numbers do you normally see but the numbers you sent earlier show that your exp had done 26000 sqlnet roundtrips which on average took over 10ms each. Note that the sql*net messasge from client wait time includes the following:</p>
<p>1) time the result network packets are &#8220;flying&#8221; towards the client<br />
2) client application think time &#8211; this is important as if you use some pipe for compression on the fly, the think time may become even longer<br />
3) time the next request packet is &#8220;flying&#8221; towards the server</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eduardo Legatti</title>
		<link>http://blog.tanelpoder.com/2008/02/10/sqlnet-message-to-client-vs-sqlnet-more-data-to-client/comment-page-1/#comment-1577</link>
		<dc:creator>Eduardo Legatti</dc:creator>
		<pubDate>Sat, 16 May 2009 00:21:54 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/02/10/sqlnet-message-to-client-vs-sqlnet-more-data-to-client/#comment-1577</guid>
		<description>Hi Tanel,

Thanks for the response. In fact, I have never faced this kind of problem before. I&#039;m trying to understand why in the local server the export operation took so fast, and why the export operation from a remote machine took so long. 2 or 3 minutes is acceptable, but 1 hour? For 5 years, we have working in a Oracle 10g installed in another server, and this kind of problem have never happened before. The development team used to take exports (exp) and imports (imp) using default buffers size since then, without problems:

exp user/passwrod@service file=file.dmp ...

The network analyst of the company made some tests using &quot;scp&quot; Linux commands in order to copy big files from that new Oracle 11g server to another server and vice versa without problems. The speed rate of copying a file was normal as expected (10MB/s) in a 100Mbs network.

The SDU/TDU SQLNet configuration is using the default values. The MTU of the LAN is fine too (1500 bytes).

So, I&#039;m not sure how to find out either what could might causing this delay or contention. Maybe looking at Linux Kernel related network parameters? Maybe taking a test ... like connecting a direct crossover cable connection between the server and a client machine?

Well, on next Monday I will try to take more tests ...

Thanks.</description>
		<content:encoded><![CDATA[<p>Hi Tanel,</p>
<p>Thanks for the response. In fact, I have never faced this kind of problem before. I&#8217;m trying to understand why in the local server the export operation took so fast, and why the export operation from a remote machine took so long. 2 or 3 minutes is acceptable, but 1 hour? For 5 years, we have working in a Oracle 10g installed in another server, and this kind of problem have never happened before. The development team used to take exports (exp) and imports (imp) using default buffers size since then, without problems:</p>
<p>exp user/passwrod@service file=file.dmp &#8230;</p>
<p>The network analyst of the company made some tests using &#8220;scp&#8221; Linux commands in order to copy big files from that new Oracle 11g server to another server and vice versa without problems. The speed rate of copying a file was normal as expected (10MB/s) in a 100Mbs network.</p>
<p>The SDU/TDU SQLNet configuration is using the default values. The MTU of the LAN is fine too (1500 bytes).</p>
<p>So, I&#8217;m not sure how to find out either what could might causing this delay or contention. Maybe looking at Linux Kernel related network parameters? Maybe taking a test &#8230; like connecting a direct crossover cable connection between the server and a client machine?</p>
<p>Well, on next Monday I will try to take more tests &#8230;</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tanel Poder</title>
		<link>http://blog.tanelpoder.com/2008/02/10/sqlnet-message-to-client-vs-sqlnet-more-data-to-client/comment-page-1/#comment-1573</link>
		<dc:creator>Tanel Poder</dc:creator>
		<pubDate>Fri, 15 May 2009 19:38:25 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/02/10/sqlnet-message-to-client-vs-sqlnet-more-data-to-client/#comment-1573</guid>
		<description>Hi Eduardo,

See taht your session had made 26048 roundtrips during session startup. Now if every roundtrip takes let say 100ms then you&#039;ll have ~2600 seconds of response time there. In fact in your case the time spent waiting for client (next fetch) was ~3000 seconds already. So it&#039;s the network latency combined with high number of fetches/network roundtrips.

How did you perform the export? Make your export buffer size larger, this should reduce number of network roundtrips and response time.</description>
		<content:encoded><![CDATA[<p>Hi Eduardo,</p>
<p>See taht your session had made 26048 roundtrips during session startup. Now if every roundtrip takes let say 100ms then you&#8217;ll have ~2600 seconds of response time there. In fact in your case the time spent waiting for client (next fetch) was ~3000 seconds already. So it&#8217;s the network latency combined with high number of fetches/network roundtrips.</p>
<p>How did you perform the export? Make your export buffer size larger, this should reduce number of network roundtrips and response time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eduardo Legatti</title>
		<link>http://blog.tanelpoder.com/2008/02/10/sqlnet-message-to-client-vs-sqlnet-more-data-to-client/comment-page-1/#comment-1572</link>
		<dc:creator>Eduardo Legatti</dc:creator>
		<pubDate>Fri, 15 May 2009 19:08:27 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/02/10/sqlnet-message-to-client-vs-sqlnet-more-data-to-client/#comment-1572</guid>
		<description>Hi Tanel,

3 weeks ago I finished to configure an Oracle Database 11g (11.1.0.7) 64 bits on a Linux (4 GM RAM), and after some tests, I noticed a SQL low response time. So, I thought ... there is something strange happening here:
I made a test in the local server, exporting a table T1 (using the traditional exp utility) that contains around 1 million rows on it. The export operation took less than 10 seconds to complete.

After that, I performed the same export operation in a remote machine. By the way, the remote machine and the Oracle server are currently located at same network.

For my surprise, the export operation took around 1 hour to complete!! I&#039;m not sure where are the bottleneck. Do you believe that there is a contention or something relationed to the network layer? Apparently, the network is fine ...

Below, I attached the output of some informations while taking the export from the remote machine. I noticed high values in some informations ...

IO - v$sess_io 
--------------
block_gets = 3
consistent_gets = 52,730
physical_reads = 20,027

WAITS - v$session_event 
-----------------------
SQL*Net message from client &gt; total_waits = 25,635 time_waited = 306,000
SQL*Net message to client &gt; total_waits = 25,635 time_waited = 2
SQL*Net nore data to client &gt; total_waits = 97 time_waited = 0

STATISTICS - v$sesstat
----------------------
bytes sent via SQL*Net to client = 146,167,218
bytes received via SQL*Net from client = 299,577
SQL*Net roundtrips to/from client = 26,048

SQL
---
SELECT /*+NESTED_TABLE_GET_REFS+*/ 
       &quot;SCOTT&quot;.&quot;T1&quot;.* 
  FROM &quot;SCOTT&quot;.&quot;T1&quot;

Cheers</description>
		<content:encoded><![CDATA[<p>Hi Tanel,</p>
<p>3 weeks ago I finished to configure an Oracle Database 11g (11.1.0.7) 64 bits on a Linux (4 GM RAM), and after some tests, I noticed a SQL low response time. So, I thought &#8230; there is something strange happening here:<br />
I made a test in the local server, exporting a table T1 (using the traditional exp utility) that contains around 1 million rows on it. The export operation took less than 10 seconds to complete.</p>
<p>After that, I performed the same export operation in a remote machine. By the way, the remote machine and the Oracle server are currently located at same network.</p>
<p>For my surprise, the export operation took around 1 hour to complete!! I&#8217;m not sure where are the bottleneck. Do you believe that there is a contention or something relationed to the network layer? Apparently, the network is fine &#8230;</p>
<p>Below, I attached the output of some informations while taking the export from the remote machine. I noticed high values in some informations &#8230;</p>
<p>IO &#8211; v$sess_io<br />
&#8212;&#8212;&#8212;&#8212;&#8211;<br />
block_gets = 3<br />
consistent_gets = 52,730<br />
physical_reads = 20,027</p>
<p>WAITS &#8211; v$session_event<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
SQL*Net message from client &gt; total_waits = 25,635 time_waited = 306,000<br />
SQL*Net message to client &gt; total_waits = 25,635 time_waited = 2<br />
SQL*Net nore data to client &gt; total_waits = 97 time_waited = 0</p>
<p>STATISTICS &#8211; v$sesstat<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
bytes sent via SQL*Net to client = 146,167,218<br />
bytes received via SQL*Net from client = 299,577<br />
SQL*Net roundtrips to/from client = 26,048</p>
<p>SQL<br />
&#8212;<br />
SELECT /*+NESTED_TABLE_GET_REFS+*/<br />
       &#8220;SCOTT&#8221;.&#8221;T1&#8243;.*<br />
  FROM &#8220;SCOTT&#8221;.&#8221;T1&#8243;</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kerry Osborne&#8217;s Oracle Blog &#187; Blog Archive Hidden SQL - why can&#8217;t I find my SQL Text? - Kerry Osborne’s Oracle Blog</title>
		<link>http://blog.tanelpoder.com/2008/02/10/sqlnet-message-to-client-vs-sqlnet-more-data-to-client/comment-page-1/#comment-1400</link>
		<dc:creator>Kerry Osborne&#8217;s Oracle Blog &#187; Blog Archive Hidden SQL - why can&#8217;t I find my SQL Text? - Kerry Osborne’s Oracle Blog</dc:creator>
		<pubDate>Thu, 16 Apr 2009 15:32:42 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/02/10/sqlnet-message-to-client-vs-sqlnet-more-data-to-client/#comment-1400</guid>
		<description>[...] I was surprised to find that the statement was short - only a few lines long. I was expecting a really long string that would not fit in a single SQL*Net packet. After all, we are waiting on the &#8220;SQL*Net more data FROM client&#8221; event, right? Which is supposed to be the time waited for an additional packet from the client when Oracle knows that more is coming. Clearly this was not the case. Rather it is waiting because Oracle is sending data back to the client that takes more than one packet (i.e. the LOB). You would expect that time would be logged under the &#8220;SQL*Net more data TO client&#8221; event in this case. However, it appears that time is logged to that event only until the packet is turned over to the network. It appears that Oracle then starts logging time to the &#8220;SQL*Net more data FROM client&#8221; event while it waits for the next response from the client. Therefore, the actual network transfer time is clocked to the wrong event. You can understand why the developers made this choice, because Oracle has no way of knowing how long it actually takes the packet to get to the client. It only knows how long the round trip takes. So maybe they should have named the event slightly differently, like &#8220;SQL*Net more data from client including the entire round trip network time&#8221; or something. Anyway, Tanel Poder has a post that briefly mentions this quirk of the SQL*Net events. [...]</description>
		<content:encoded><![CDATA[<p>[...] I was surprised to find that the statement was short &#8211; only a few lines long. I was expecting a really long string that would not fit in a single SQL*Net packet. After all, we are waiting on the &#8220;SQL*Net more data FROM client&#8221; event, right? Which is supposed to be the time waited for an additional packet from the client when Oracle knows that more is coming. Clearly this was not the case. Rather it is waiting because Oracle is sending data back to the client that takes more than one packet (i.e. the LOB). You would expect that time would be logged under the &#8220;SQL*Net more data TO client&#8221; event in this case. However, it appears that time is logged to that event only until the packet is turned over to the network. It appears that Oracle then starts logging time to the &#8220;SQL*Net more data FROM client&#8221; event while it waits for the next response from the client. Therefore, the actual network transfer time is clocked to the wrong event. You can understand why the developers made this choice, because Oracle has no way of knowing how long it actually takes the packet to get to the client. It only knows how long the round trip takes. So maybe they should have named the event slightly differently, like &#8220;SQL*Net more data from client including the entire round trip network time&#8221; or something. Anyway, Tanel Poder has a post that briefly mentions this quirk of the SQL*Net events. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tanelp</title>
		<link>http://blog.tanelpoder.com/2008/02/10/sqlnet-message-to-client-vs-sqlnet-more-data-to-client/comment-page-1/#comment-306</link>
		<dc:creator>tanelp</dc:creator>
		<pubDate>Wed, 16 Jul 2008 08:38:18 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/02/10/sqlnet-message-to-client-vs-sqlnet-more-data-to-client/#comment-306</guid>
		<description>Hi Kyle,

Note that Bob mentioned events from different classes &quot;message FROM client&quot; and &quot;more data TO client&quot;

&quot;SQL*Net more data to client&quot; is supposed to be like &quot;SQL*Net message to client&quot; but only for large responses which span a sqlnet packet size. First packet is still sent back &quot;under&quot; message to client wait event and subsequent packets for that call using more data to client.

Unfortunately the &quot;SQL*Net message to client&quot; time is not accounted properly in Oracle, so it can&#039;t be used for calculating any transfer time.

The &quot;SQL*Net more data to client&quot; is a little different as at least it looks like its instrumented properly (e.g. if the socket write call blocks, that time is accounted).

There are still some unclear pieces, and some research I want to do on this once I get time. When I do, I post the results :)</description>
		<content:encoded><![CDATA[<p>Hi Kyle,</p>
<p>Note that Bob mentioned events from different classes &#8220;message FROM client&#8221; and &#8220;more data TO client&#8221;</p>
<p>&#8220;SQL*Net more data to client&#8221; is supposed to be like &#8220;SQL*Net message to client&#8221; but only for large responses which span a sqlnet packet size. First packet is still sent back &#8220;under&#8221; message to client wait event and subsequent packets for that call using more data to client.</p>
<p>Unfortunately the &#8220;SQL*Net message to client&#8221; time is not accounted properly in Oracle, so it can&#8217;t be used for calculating any transfer time.</p>
<p>The &#8220;SQL*Net more data to client&#8221; is a little different as at least it looks like its instrumented properly (e.g. if the socket write call blocks, that time is accounted).</p>
<p>There are still some unclear pieces, and some research I want to do on this once I get time. When I do, I post the results :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
