<?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: Hive memory stuffing in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Hive-memory-stuffing/m-p/326293#M229858</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/44519"&gt;@enirys&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could refer to the following doc for Hive tuning:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.cloudera.com/HDPDocuments/HDP2/HDP-2.6.5/bk_hive-performance-tuning/content/ch_connectivity-admission-control.html#guidelines-hiveserver2-heaps" target="_blank"&gt;https://docs.cloudera.com/HDPDocuments/HDP2/HDP-2.6.5/bk_hive-performance-tuning/content/ch_connectivity-admission-control.html#guidelines-hiveserver2-heaps&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have other services running on the same HS2 node as well, you might want to reduce Hive heap size&amp;nbsp; or move a service to a different node. Are you expecting too many connections as explained in the above doc, else you might want to bring down HS2 heap size? If you do not see too many connections, but notice high heap usage, you might want to take a heap dump as&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/71090"&gt;@asish&lt;/a&gt;&amp;nbsp;mentioned, and see if there is memory leak.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Load balancing across HS2 could take place based on how you are accessing Hive. You could use zooKeeper based connection string.&lt;/P&gt;</description>
    <pubDate>Mon, 04 Oct 2021 15:50:27 GMT</pubDate>
    <dc:creator>smruti</dc:creator>
    <dc:date>2021-10-04T15:50:27Z</dc:date>
    <item>
      <title>Hive memory stuffing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-memory-stuffing/m-p/325545#M229666</link>
      <description>&lt;P&gt;We have an hdp cluster 2.6.5, hive service is installed with HA&lt;/P&gt;&lt;P&gt;3 Hive server&lt;/P&gt;&lt;P&gt;3 Metastores&lt;/P&gt;&lt;P data-unlink="true"&gt;1 HiveServer2 Interactive&lt;/P&gt;&lt;P data-unlink="true"&gt;1 WebHCat Server&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;We are receiving "memory high usage" alerts from our monitoring tool, when i check the memory consumption on that nodes i can see that hive is consuming more than 80% of memory node&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;When memory usage reach 98%, the hive server crash with the following error message&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[root@mnode4 hive]# head -n 20 hs_err_pid27508.log
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 1732247552 bytes for committing reserved memory.
# Possible reasons:
#   The system is out of physical RAM or swap space
#   In 32 bit mode, the process size limit was hit
# Possible solutions:
#   Reduce memory load on the system
#   Increase physical memory or swap space
#   Check if swap backing store is full
#   Use 64 bit Java on a 64 bit OS
#   Decrease Java heap size (-Xmx/-Xms)
#   Decrease number of Java threads
#   Decrease Java thread stack sizes (-Xss)
#   Set larger code cache with -XX:ReservedCodeCacheSize=
# This output file may be truncated or incomplete.
#
#  Out of Memory Error (os_linux.cpp:2627), pid=27508, tid=0x00007f43152a3700
#
# JRE version: Java(TM) SE Runtime Environment (8.0_112-b15) (build 1.8.0_112-b15)&lt;/LI-CODE&gt;&lt;P data-unlink="true"&gt;htop give the bellow view&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="enirys_0-1632821811542.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/32475i1837939202F87E6B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="enirys_0-1632821811542.png" alt="enirys_0-1632821811542.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Why all these process are created ? How to reduce memory usage ?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 09:43:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-memory-stuffing/m-p/325545#M229666</guid>
      <dc:creator>enirys</dc:creator>
      <dc:date>2021-09-28T09:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Hive memory stuffing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-memory-stuffing/m-p/325713#M229701</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/44519"&gt;@enirys&lt;/a&gt;&amp;nbsp;htop lists every single thread as a separate process. Every individual connection to HS2 and HMS shows up as different processes. So, you do not need to worry about that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you say, you have 3 hiveserver2 nodes, see if you could reduce heap size of the hiveserver2.&lt;/P&gt;&lt;P&gt;You could also lower 'hive.server2.thrift.max.worker.threads' so, it does not spin up too many threads in a single hs2 node. Make sure that your workload is getting distributed across HS2s.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 15:19:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-memory-stuffing/m-p/325713#M229701</guid>
      <dc:creator>smruti</dc:creator>
      <dc:date>2021-09-29T15:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: Hive memory stuffing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-memory-stuffing/m-p/325783#M229718</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/44519"&gt;@enirys&lt;/a&gt;&amp;nbsp;For a memory crash,we need heapdump.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please append the below in JAVA_OPTIONS of hiveserver2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;-XX:+HeapDumpOnOutOfMemoryError&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;-XX:HeapDumpPath=/disk2/dumps&lt;/STRONG&gt;&lt;/PRE&gt;&lt;P&gt;Make sure you provide the path correctly. Whenever there is a crash,an hprof file would be generated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use Eclipse MAT or jxray to analyze the leak suspect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also take heapdump on demand ,using "jmap" utility when&amp;nbsp; the consumption is 80%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;jmap -dump:live,format=b,file=/disk2/dumps/dump.hprof &amp;lt;PID of Hiveserver2&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let us know,if the queries are answered. Please ""Accept This a solution" if your queries are answered.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 07:00:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-memory-stuffing/m-p/325783#M229718</guid>
      <dc:creator>asish</dc:creator>
      <dc:date>2021-09-30T07:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: Hive memory stuffing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-memory-stuffing/m-p/325810#M229731</link>
      <description>&lt;P&gt;hi &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/82698"&gt;@smruti&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply, bellow values of Hive heap size&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HS2 Heap Size = 44201MB&lt;/P&gt;&lt;P&gt;MS Heap Size = 14733MB&lt;/P&gt;&lt;P&gt;Hive Client heap size = 1024MB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hive.server2.thrift.max.worker.threads = 500&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any recommandation/documentation rom cloudera on how to calculate set right value ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your last comment is very intersting, how can i check if my workload is distributed ?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 09:29:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-memory-stuffing/m-p/325810#M229731</guid>
      <dc:creator>enirys</dc:creator>
      <dc:date>2021-09-30T09:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Hive memory stuffing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-memory-stuffing/m-p/325811#M229732</link>
      <description>&lt;P&gt;Hi&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/71090"&gt;@asish&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your advises, very useful.&lt;/P&gt;&lt;P&gt;i'll try that and give you a feedback&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 09:32:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-memory-stuffing/m-p/325811#M229732</guid>
      <dc:creator>enirys</dc:creator>
      <dc:date>2021-09-30T09:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: Hive memory stuffing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-memory-stuffing/m-p/326175#M229801</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/44519"&gt;@enirys&lt;/a&gt;,&amp;nbsp;Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 05:40:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-memory-stuffing/m-p/326175#M229801</guid>
      <dc:creator>VidyaSargur</dc:creator>
      <dc:date>2021-10-04T05:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: Hive memory stuffing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-memory-stuffing/m-p/326282#M229852</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/32119"&gt;@VidyaSargur&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not my issue is not esolved yet, i'm testing &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/82698"&gt;@smruti&lt;/a&gt;'s recommandations and i'm waiting for his feedback&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 14:03:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-memory-stuffing/m-p/326282#M229852</guid>
      <dc:creator>enirys</dc:creator>
      <dc:date>2021-10-04T14:03:58Z</dc:date>
    </item>
    <item>
      <title>Re: Hive memory stuffing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-memory-stuffing/m-p/326293#M229858</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/44519"&gt;@enirys&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could refer to the following doc for Hive tuning:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.cloudera.com/HDPDocuments/HDP2/HDP-2.6.5/bk_hive-performance-tuning/content/ch_connectivity-admission-control.html#guidelines-hiveserver2-heaps" target="_blank"&gt;https://docs.cloudera.com/HDPDocuments/HDP2/HDP-2.6.5/bk_hive-performance-tuning/content/ch_connectivity-admission-control.html#guidelines-hiveserver2-heaps&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have other services running on the same HS2 node as well, you might want to reduce Hive heap size&amp;nbsp; or move a service to a different node. Are you expecting too many connections as explained in the above doc, else you might want to bring down HS2 heap size? If you do not see too many connections, but notice high heap usage, you might want to take a heap dump as&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/71090"&gt;@asish&lt;/a&gt;&amp;nbsp;mentioned, and see if there is memory leak.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Load balancing across HS2 could take place based on how you are accessing Hive. You could use zooKeeper based connection string.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 15:50:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-memory-stuffing/m-p/326293#M229858</guid>
      <dc:creator>smruti</dc:creator>
      <dc:date>2021-10-04T15:50:27Z</dc:date>
    </item>
  </channel>
</rss>

