<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Visualize in real time CPU and RAM consumption of sql connections in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/visualize-in-real-time-cpu-and-ram-consumption-of-sql-connections/qaa-p/13847098#M4877941</link>
    <description>&lt;P&gt;Sybase Central and other tools all get their connection-level performance statistics from the &lt;A href="http://dcx.sybase.com/index.html#1201/en/dbadmin/connection-properties.html" rel="nofollow noopener noreferrer" target="_blank"&gt;builtin SQL Anywhere connection properties&lt;/A&gt;, and closest thing to a connection property for "RAM consumption" are TempFilePages and TempTablePages, with TempFilePages being the more useful of the two.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;B&gt;TempFilePages&lt;/B&gt; Returns the number of temporary file pages used by the connection.
&lt;P&gt;
&lt;B&gt;TempTablePages&lt;/B&gt; Returns the number of pages in the temporary file used for temporary tables.
&lt;/P&gt;&lt;/BLOCKQUOTE&gt;

&lt;P&gt;The closest connection property to "CPU consumption" is ApproximateCPUTime, and there are many other properties like RollbackLogPages that may also be of interest to you:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;B&gt;ApproximateCPUTime&lt;/B&gt; Returns an estimate of the amount of CPU time accumulated by a given connection, in seconds. The value returned may differ from the actual value by as much as 50%, although typical variations are in the 5-10% range. On multi-processor computers, each CPU (or hyperthread or core) accumulates time, so the sum of accumulated times for all connections may be greater than the elapsed time. This property is supported on Windows and Linux.
&lt;P&gt;
&lt;B&gt;RollbackLogPages&lt;/B&gt; Returns the number of pages in the rollback log.
&lt;/P&gt;&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Unfortunately, Connections pane in Sybase Central 12 doesn't show any of those connection properties and there's no way to tell it to.&lt;/P&gt;
&lt;P&gt; &lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Re Visualize in real time CPU and RAM consumption of sql connections"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/189777iAA139C2056678124/image-size/large?v=v2&amp;amp;px=999" role="button" title="Re Visualize in real time CPU and RAM consumption of sql connections" alt="Re Visualize in real time CPU and RAM consumption of sql connections" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You can, however, tell the SQL Anywhere 12 DBConsole utility to display all those connection properties:&lt;/P&gt;
&lt;P&gt; &lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Re Visualize in real time CPU and RAM consumption of sql connections"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/189778iA6289E4EA99A4906/image-size/large?v=v2&amp;amp;px=999" role="button" title="Re Visualize in real time CPU and RAM consumption of sql connections" alt="Re Visualize in real time CPU and RAM consumption of sql connections" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Here's how to launch DBConsole and connect to a running SQL Anywhere 12 database:&lt;/P&gt;
&lt;PRE&gt;"%SQLANY12%\\bin32\\dbconsole.exe"^
  -c "ENG=inventory12_envy;DBN=inventory12;UID=dba;PWD=sql;"
&lt;/PRE&gt;

&lt;P&gt;Unfortunately, unlike Sybase Central, DBConsole doesn't show the 8 internal connections that were spawned when the "k.delacruz" connection used intra-query parallelism to execute a runaway query. It also doesn't show any CPU time at all being consumed by the "k.delacruz" connection, which is true but profoundly misleading: the "k.delacruz" connection may not be using any CPU time but its eight minions are using up everything that eight CPUs have to offer.&lt;/P&gt;
&lt;P&gt;The &lt;A href="http://www.risingroad.com/foxhound/index.html" rel="nofollow noopener noreferrer" target="_blank"&gt;Foxhound 3 Database Monitor&lt;/A&gt; shows it all: all the internal connections, all the CPU time they are using, plus the total CPU time is also shown against "k.delacruz":&lt;/P&gt;
&lt;P&gt; &lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Re Visualize in real time CPU and RAM consumption of sql connections"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/189779i472C245D29004A7C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Re Visualize in real time CPU and RAM consumption of sql connections" alt="Re Visualize in real time CPU and RAM consumption of sql connections" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Foxhound also saves all the data it captures so you can look back in time to see what an individual connection was doing...&lt;/P&gt;
&lt;P&gt; &lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Re Visualize in real time CPU and RAM consumption of sql connections"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/189780i057BA45CB11278A2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Re Visualize in real time CPU and RAM consumption of sql connections" alt="Re Visualize in real time CPU and RAM consumption of sql connections" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You can read more about Foxhound in &lt;A href="http://www.risingroad.com/foxhound-3-0/Foxhound%203%20Database%20Monitor%20White%20Paper.pdf" rel="nofollow noopener noreferrer" target="_blank"&gt;the white paper here&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Fri, 21 Nov 2014 09:46:51 GMT</pubDate>
    <dc:creator>Breck_Carter</dc:creator>
    <dc:date>2014-11-21T09:46:51Z</dc:date>
    <item>
      <title>Visualize in real time CPU and RAM consumption of sql connections</title>
      <link>https://community.sap.com/t5/technology-q-a/visualize-in-real-time-cpu-and-ram-consumption-of-sql-connections/qaq-p/13847096</link>
      <description>&lt;P&gt;I want to keep track of which connection use most of resources.&lt;/P&gt;
&lt;P&gt;Within Sybase Central (SQL Anywhere 9, 12), for each server and database, we have pane to check in real time All Connected Users and Connections.&lt;/P&gt;
&lt;P&gt;How to check for each connect it's cpu and ram consumption (in real time)?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Nov 2014 14:54:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/visualize-in-real-time-cpu-and-ram-consumption-of-sql-connections/qaq-p/13847096</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-11-20T14:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: Visualize in real time CPU and RAM consumption of sql connections</title>
      <link>https://community.sap.com/t5/technology-q-a/visualize-in-real-time-cpu-and-ram-consumption-of-sql-connections/qaa-p/13847097#M4877940</link>
      <description>&lt;P&gt;I don't think it is possible, but you could use the &lt;A href="http://dcx.sybase.com/index.html#sa160/en/dbusage/performance-s-5753386.html"&gt;request level logging&lt;/A&gt; to identify any long running statement instead.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Nov 2014 08:34:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/visualize-in-real-time-cpu-and-ram-consumption-of-sql-connections/qaa-p/13847097#M4877940</guid>
      <dc:creator>MCMartin</dc:creator>
      <dc:date>2014-11-21T08:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Visualize in real time CPU and RAM consumption of sql connections</title>
      <link>https://community.sap.com/t5/technology-q-a/visualize-in-real-time-cpu-and-ram-consumption-of-sql-connections/qaa-p/13847098#M4877941</link>
      <description>&lt;P&gt;Sybase Central and other tools all get their connection-level performance statistics from the &lt;A href="http://dcx.sybase.com/index.html#1201/en/dbadmin/connection-properties.html" rel="nofollow noopener noreferrer" target="_blank"&gt;builtin SQL Anywhere connection properties&lt;/A&gt;, and closest thing to a connection property for "RAM consumption" are TempFilePages and TempTablePages, with TempFilePages being the more useful of the two.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;B&gt;TempFilePages&lt;/B&gt; Returns the number of temporary file pages used by the connection.
&lt;P&gt;
&lt;B&gt;TempTablePages&lt;/B&gt; Returns the number of pages in the temporary file used for temporary tables.
&lt;/P&gt;&lt;/BLOCKQUOTE&gt;

&lt;P&gt;The closest connection property to "CPU consumption" is ApproximateCPUTime, and there are many other properties like RollbackLogPages that may also be of interest to you:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;B&gt;ApproximateCPUTime&lt;/B&gt; Returns an estimate of the amount of CPU time accumulated by a given connection, in seconds. The value returned may differ from the actual value by as much as 50%, although typical variations are in the 5-10% range. On multi-processor computers, each CPU (or hyperthread or core) accumulates time, so the sum of accumulated times for all connections may be greater than the elapsed time. This property is supported on Windows and Linux.
&lt;P&gt;
&lt;B&gt;RollbackLogPages&lt;/B&gt; Returns the number of pages in the rollback log.
&lt;/P&gt;&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Unfortunately, Connections pane in Sybase Central 12 doesn't show any of those connection properties and there's no way to tell it to.&lt;/P&gt;
&lt;P&gt; &lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Re Visualize in real time CPU and RAM consumption of sql connections"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/189777iAA139C2056678124/image-size/large?v=v2&amp;amp;px=999" role="button" title="Re Visualize in real time CPU and RAM consumption of sql connections" alt="Re Visualize in real time CPU and RAM consumption of sql connections" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You can, however, tell the SQL Anywhere 12 DBConsole utility to display all those connection properties:&lt;/P&gt;
&lt;P&gt; &lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Re Visualize in real time CPU and RAM consumption of sql connections"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/189778iA6289E4EA99A4906/image-size/large?v=v2&amp;amp;px=999" role="button" title="Re Visualize in real time CPU and RAM consumption of sql connections" alt="Re Visualize in real time CPU and RAM consumption of sql connections" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Here's how to launch DBConsole and connect to a running SQL Anywhere 12 database:&lt;/P&gt;
&lt;PRE&gt;"%SQLANY12%\\bin32\\dbconsole.exe"^
  -c "ENG=inventory12_envy;DBN=inventory12;UID=dba;PWD=sql;"
&lt;/PRE&gt;

&lt;P&gt;Unfortunately, unlike Sybase Central, DBConsole doesn't show the 8 internal connections that were spawned when the "k.delacruz" connection used intra-query parallelism to execute a runaway query. It also doesn't show any CPU time at all being consumed by the "k.delacruz" connection, which is true but profoundly misleading: the "k.delacruz" connection may not be using any CPU time but its eight minions are using up everything that eight CPUs have to offer.&lt;/P&gt;
&lt;P&gt;The &lt;A href="http://www.risingroad.com/foxhound/index.html" rel="nofollow noopener noreferrer" target="_blank"&gt;Foxhound 3 Database Monitor&lt;/A&gt; shows it all: all the internal connections, all the CPU time they are using, plus the total CPU time is also shown against "k.delacruz":&lt;/P&gt;
&lt;P&gt; &lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Re Visualize in real time CPU and RAM consumption of sql connections"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/189779i472C245D29004A7C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Re Visualize in real time CPU and RAM consumption of sql connections" alt="Re Visualize in real time CPU and RAM consumption of sql connections" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Foxhound also saves all the data it captures so you can look back in time to see what an individual connection was doing...&lt;/P&gt;
&lt;P&gt; &lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Re Visualize in real time CPU and RAM consumption of sql connections"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/189780i057BA45CB11278A2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Re Visualize in real time CPU and RAM consumption of sql connections" alt="Re Visualize in real time CPU and RAM consumption of sql connections" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You can read more about Foxhound in &lt;A href="http://www.risingroad.com/foxhound-3-0/Foxhound%203%20Database%20Monitor%20White%20Paper.pdf" rel="nofollow noopener noreferrer" target="_blank"&gt;the white paper here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Nov 2014 09:46:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/visualize-in-real-time-cpu-and-ram-consumption-of-sql-connections/qaa-p/13847098#M4877941</guid>
      <dc:creator>Breck_Carter</dc:creator>
      <dc:date>2014-11-21T09:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Visualize in real time CPU and RAM consumption of sql connections</title>
      <link>https://community.sap.com/t5/technology-q-a/visualize-in-real-time-cpu-and-ram-consumption-of-sql-connections/qaa-p/13847099#M4877942</link>
      <description>&lt;P&gt;This solutions apply also to SQL Anywhere 9?&lt;/P&gt;</description>
      <pubDate>Sat, 22 Nov 2014 11:34:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/visualize-in-real-time-cpu-and-ram-consumption-of-sql-connections/qaa-p/13847099#M4877942</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-11-22T11:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: Visualize in real time CPU and RAM consumption of sql connections</title>
      <link>https://community.sap.com/t5/technology-q-a/visualize-in-real-time-cpu-and-ram-consumption-of-sql-connections/qaa-p/13847100#M4877943</link>
      <description>&lt;P&gt;The connection_property('QueryHeapPages') can be used to find out how much memory a connection is using for query processing (sorts, hash join, hash group by, hash distinct). This is available in 9.0 as well.&lt;/P&gt;
&lt;P&gt;Connections can use memory for other purposes as well (for example, to store the data structures to execute query plans or store the current values during execution) but usually these are relatively small unless the query is very complex.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Nov 2014 09:28:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/visualize-in-real-time-cpu-and-ram-consumption-of-sql-connections/qaa-p/13847100#M4877943</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-11-25T09:28:34Z</dc:date>
    </item>
  </channel>
</rss>

