<?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: Any thoughts on why MySQL is utilizing over 100% CPU in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Any-thoughts-on-why-MySQL-is-utilizing-over-100-CPU/m-p/146921#M23833</link>
    <description>&lt;A rel="user" href="https://community.cloudera.com/users/3669/marcfussell.html" nodeid="3669"&gt;@marksf&lt;/A&gt;&lt;P&gt;Do this:&lt;/P&gt;&lt;P&gt;1) run top as root&lt;/P&gt;&lt;P&gt;2) locate top pid and then see what process those pid belongs to. &lt;/P&gt;&lt;P&gt;Once you are 100% sure that mysql causing the issue and those sql are not related to hadoop or ambari then follow &lt;A target="_blank" href="http://stackoverflow.com/questions/1282232/mysql-high-cpu-usage"&gt;this&lt;/A&gt; &lt;/P&gt;</description>
    <pubDate>Tue, 29 Mar 2016 01:23:51 GMT</pubDate>
    <dc:creator>nsabharwal</dc:creator>
    <dc:date>2016-03-29T01:23:51Z</dc:date>
    <item>
      <title>Any thoughts on why MySQL is utilizing over 100% CPU</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Any-thoughts-on-why-MySQL-is-utilizing-over-100-CPU/m-p/146918#M23830</link>
      <description>&lt;P&gt;This is new install for development purposes.  The install completed fine, I can login to Ambari (HDP-2.3.4.0-3485) and the dashboard looks fine (all green).  However, the server on which I have installed Ambari (and MySQL 5.6) is getting killed by the MySQL process.&lt;/P&gt;&lt;P&gt;I turned on SQL logging to see what was happening and it appears to simply be 100's (or 1000's) of SQL statements.  (I did turn MySQL loggin back off as I know that has an impact for performance.)&lt;/P&gt;&lt;P&gt;Is this normal or am I missing something?&lt;/P&gt;&lt;P&gt;No one is using the system yet - meaning Hadoop (or any other server) is not being used by anyone yet.  However, the MySQL process is just hammering the CPU - which seems odd to me.&lt;/P&gt;&lt;P&gt;I have let it run for over 24 hours (thinking it would slow down at some point, but after 24 hour of no one using the system the CPU is still pegged.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 10:11:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Any-thoughts-on-why-MySQL-is-utilizing-over-100-CPU/m-p/146918#M23830</guid>
      <dc:creator>marc_fussell</dc:creator>
      <dc:date>2022-09-16T10:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: Any thoughts on why MySQL is utilizing over 100% CPU</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Any-thoughts-on-why-MySQL-is-utilizing-over-100-CPU/m-p/146919#M23831</link>
      <description>&lt;P&gt;Hi @marksf, what are the system specs? CPU, RAM, etc. Not that this is the root cause of the problem but it can help as we start to suggest options. Was this MySQL service a fresh install with HDP or was it existing? &lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2016 00:10:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Any-thoughts-on-why-MySQL-is-utilizing-over-100-CPU/m-p/146919#M23831</guid>
      <dc:creator>aparanjape</dc:creator>
      <dc:date>2016-03-29T00:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: Any thoughts on why MySQL is utilizing over 100% CPU</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Any-thoughts-on-why-MySQL-is-utilizing-over-100-CPU/m-p/146920#M23832</link>
      <description>&lt;P&gt;Thanks for the reply.  It is a two core CPU system with 8 GM RAM.  100% clean install running CentOS 6.7.  I installed MySQL and HDP at the same time - just after the OS install.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2016 01:16:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Any-thoughts-on-why-MySQL-is-utilizing-over-100-CPU/m-p/146920#M23832</guid>
      <dc:creator>marc_fussell</dc:creator>
      <dc:date>2016-03-29T01:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Any thoughts on why MySQL is utilizing over 100% CPU</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Any-thoughts-on-why-MySQL-is-utilizing-over-100-CPU/m-p/146921#M23833</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/3669/marcfussell.html" nodeid="3669"&gt;@marksf&lt;/A&gt;&lt;P&gt;Do this:&lt;/P&gt;&lt;P&gt;1) run top as root&lt;/P&gt;&lt;P&gt;2) locate top pid and then see what process those pid belongs to. &lt;/P&gt;&lt;P&gt;Once you are 100% sure that mysql causing the issue and those sql are not related to hadoop or ambari then follow &lt;A target="_blank" href="http://stackoverflow.com/questions/1282232/mysql-high-cpu-usage"&gt;this&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2016 01:23:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Any-thoughts-on-why-MySQL-is-utilizing-over-100-CPU/m-p/146921#M23833</guid>
      <dc:creator>nsabharwal</dc:creator>
      <dc:date>2016-03-29T01:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: Any thoughts on why MySQL is utilizing over 100% CPU</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Any-thoughts-on-why-MySQL-is-utilizing-over-100-CPU/m-p/146922#M23834</link>
      <description>&lt;P&gt;So, I am rather certain the problem somehow pertains to ambari or my setup/config.&lt;/P&gt;&lt;P&gt;To give you an example, within MySQL I turned on SQL logging for 30 seconds to catch a snapshot of what was happening within MySQL.  In that 30 seconds, 35,650 queries were ran against the DB from Ambari.&lt;/P&gt;&lt;P&gt;Nearly all 35,650 queries look very similar to this:&lt;/P&gt;&lt;PRE&gt;Connect	ambari@hdptsrv1.test.rb.net on ambari

Query	/* mysql-connector-java-5.1.17-SNAPSHOT ( Revision: ${bzr.revision-id} ) */SHOW VARIABLES WHERE Variable_name ='language' OR Variable_name = 'net_write_timeout' OR Variable_name = 'interactive_timeout' OR Variable_name = 'wait_timeout' OR Variable_name = 'character_set_client' OR Variable_name = 'character_set_connection' OR Variable_name = 'character_set' OR Variable_name = 'character_set_server' OR Variable_name = 'tx_isolation' OR Variable_name = 'transaction_isolation' OR Variable_name = 'character_set_results' OR Variable_name = 'timezone' OR Variable_name = 'time_zone' OR Variable_name = 'system_time_zone' OR Variable_name = 'lower_case_table_names' OR Variable_name = 'max_allowed_packet' OR Variable_name = 'net_buffer_length' OR Variable_name = 'sql_mode' OR Variable_name = 'query_cache_type' OR Variable_name = 'query_cache_size' OR Variable_name = 'init_connect'

Query	/* mysql-connector-java-5.1.17-SNAPSHOT ( Revision: ${bzr.revision-id} ) */SELECT @@session.auto_increment_increment

Query	SHOW COLLATION

Query	SET NAMES latin1

Query	SET character_set_results = NULL

Query	SET autocommit=1

Query	SET sql_mode='NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES'

Query	SELECT @@session.tx_isolation

&lt;/PRE&gt;&lt;P&gt;That is right at 1,200 queries per second that are being ran by Ambari.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2016 01:45:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Any-thoughts-on-why-MySQL-is-utilizing-over-100-CPU/m-p/146922#M23834</guid>
      <dc:creator>marc_fussell</dc:creator>
      <dc:date>2016-03-29T01:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: Any thoughts on why MySQL is utilizing over 100% CPU</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Any-thoughts-on-why-MySQL-is-utilizing-over-100-CPU/m-p/146923#M23835</link>
      <description>&lt;P&gt;I have done some more reading and I have found out these queries are the result of the JDBC driver not caching the connection setting (which is the default).  If I were to add "cacheServerConfiguration=true" to the connection string then these would go away.  However, I am guessing that connection string is somewhere in the code for Ambari and there might be another fix for this.&lt;/P&gt;&lt;P&gt;Currently, asking the driver to connect with default configuration results in those statements being issued for every connection.&lt;/P&gt;&lt;P&gt;...I am still uncertain of the solution/fix, but I wanted to share what I have learned as I make progress.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2016 02:48:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Any-thoughts-on-why-MySQL-is-utilizing-over-100-CPU/m-p/146923#M23835</guid>
      <dc:creator>marc_fussell</dc:creator>
      <dc:date>2016-03-29T02:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: Any thoughts on why MySQL is utilizing over 100% CPU</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Any-thoughts-on-why-MySQL-is-utilizing-over-100-CPU/m-p/146924#M23836</link>
      <description>&lt;P&gt;It appears this was a bug that was filed with MySQL pertaining to the JDBC driver version I was using.  I was originally using mysql-connector-java-5.1.17.jar.  I have since upgraded to mysql-connector-java-5.1.38-bin.jar and this issue has gone away.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2016 04:29:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Any-thoughts-on-why-MySQL-is-utilizing-over-100-CPU/m-p/146924#M23836</guid>
      <dc:creator>marc_fussell</dc:creator>
      <dc:date>2016-03-29T04:29:28Z</dc:date>
    </item>
  </channel>
</rss>

