<?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: impala query memory limit in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/impala-query-memory-limit/m-p/58845#M66466</link>
    <description>&lt;P&gt;Hi Tim,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A minor observation:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found that "&lt;SPAN&gt;tcmalloc_physical_bytes_reserved_across_impalads&lt;/SPAN&gt;" and "&lt;SPAN&gt;mem_tracker_process_limit_across_impalads&lt;/SPAN&gt;" are for v5.3.x (ref: &lt;A href="https://www.cloudera.com/documentation/enterprise/5-3-x/topics/cm_metrics_impala.html" target="_blank"&gt;https://www.cloudera.com/documentation/enterprise/5-3-x/topics/cm_metrics_impala.html&lt;/A&gt;) and&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;tcmalloc_physical_bytes_reserved&lt;/SPAN&gt;&lt;SPAN&gt;" and "&lt;/SPAN&gt;&lt;SPAN&gt;mem_tracker_process_limit&lt;/SPAN&gt;&lt;SPAN&gt;" are for v5.7.x and above (&lt;A href="https://www.cloudera.com/documentation/enterprise/5-10-x/topics/cm_metrics_impala_daemon.html" target="_blank"&gt;https://www.cloudera.com/documentation/enterprise/5-10-x/topics/cm_metrics_impala_daemon.html&lt;/A&gt;). I'm using v5.10, however, when I try to do the Chart Build in CM I can only find the previous 2 metrics though (ie,&amp;nbsp;"tcmalloc_physical_bytes_reserved_across_impalads" and "mem_tracker_process_limit_across_impalads"&amp;nbsp;).&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also from the CM rest api, it seems like those 2 sets of metrics are the same but just different data aggregation format in the returned json&lt;/SPAN&gt;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;S.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 14 Aug 2017 21:02:28 GMT</pubDate>
    <dc:creator>shiyu17</dc:creator>
    <dc:date>2017-08-14T21:02:28Z</dc:date>
    <item>
      <title>impala query memory limit</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/impala-query-memory-limit/m-p/58712#M66464</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran&amp;nbsp;an impala query which failed due to memory limit exceeded error. I notice that I&amp;nbsp;can increase the per query memory limitation by setting the "MEM_LIMIT" at the query level (ref: &lt;A href="https://www.cloudera.com/documentation/enterprise/5-8-x/topics/impala_mem_limit.html" target="_blank"&gt;https://www.cloudera.com/documentation/enterprise/5-8-x/topics/impala_mem_limit.html&lt;/A&gt;). Also, there's an impalad daemon level memory limit which&amp;nbsp;sets the mem limit for the process&amp;nbsp;and queries that runs by&amp;nbsp;that daemon as coordinator.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a couple of questions regarding these 2 limits (the query mem limit and the daemon mem limit):&lt;/P&gt;&lt;P&gt;1) If I "set mem_limit=yyyy;" before&amp;nbsp;I run the query, I can see these lines from the query profile:&lt;/P&gt;&lt;P&gt;....&lt;BR /&gt;&lt;STRONG&gt;Query Options (non default): MEM_LIMIT=3145728&lt;/STRONG&gt;&lt;BR /&gt;Plan:&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;But if I don't explicitly set that option, it's not in the query profile, then how/where could I get&amp;nbsp;that value? Is there a CM rest api for retrieving&amp;nbsp;that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) From CM rest api, is there a way to get the Impala process&amp;nbsp;total memory and what's the max available memory to allocate to the query? I assume I&amp;nbsp;can't allocate more than&amp;nbsp;the impala process total memory, and if I&amp;nbsp;do, it won't help in allocating&amp;nbsp;more memory for running queries on that impalad host.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;S.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 12:04:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/impala-query-memory-limit/m-p/58712#M66464</guid>
      <dc:creator>shiyu17</dc:creator>
      <dc:date>2022-09-16T12:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: impala query memory limit</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/impala-query-memory-limit/m-p/58762#M66465</link>
      <description>&lt;P&gt;1) If you didn't set a memory limit for the query then the query may&amp;nbsp;expand up to the process memory limit. I.e. the query memory limit is effectively&amp;nbsp;process memory limit. This&amp;nbsp;is a pretty bad configuration for concurrent queries since the queries end up fighting it out for memory.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) To answer your CM question directly, you can get the relevant metrics from the timeseries API.&amp;nbsp;&lt;SPAN&gt;tcmalloc_physical_bytes_reserved_across_impalads is the process consumption and&amp;nbsp;mem_tracker_process_limit_across_impalads is the limit. If you paste this into the&amp;nbsp;Chart Builder you can see the averages of the two:&amp;nbsp;SELECT tcmalloc_physical_bytes_reserved_across_impalads, mem_tracker_process_limit_across_impalads WHERE entityName = "IMPALA-1" AND category = SERVICE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm wondering though if setting up admission control with resource pools and default query memory limits would solve your problem better thana custom solution:&amp;nbsp;&lt;A href="https://www.cloudera.com/documentation/enterprise/latest/topics/impala_admission.html" target="_blank"&gt;https://www.cloudera.com/documentation/enterprise/latest/topics/impala_admission.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2017 15:13:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/impala-query-memory-limit/m-p/58762#M66465</guid>
      <dc:creator>Tim Armstrong</dc:creator>
      <dc:date>2017-08-11T15:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: impala query memory limit</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/impala-query-memory-limit/m-p/58845#M66466</link>
      <description>&lt;P&gt;Hi Tim,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A minor observation:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found that "&lt;SPAN&gt;tcmalloc_physical_bytes_reserved_across_impalads&lt;/SPAN&gt;" and "&lt;SPAN&gt;mem_tracker_process_limit_across_impalads&lt;/SPAN&gt;" are for v5.3.x (ref: &lt;A href="https://www.cloudera.com/documentation/enterprise/5-3-x/topics/cm_metrics_impala.html" target="_blank"&gt;https://www.cloudera.com/documentation/enterprise/5-3-x/topics/cm_metrics_impala.html&lt;/A&gt;) and&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;tcmalloc_physical_bytes_reserved&lt;/SPAN&gt;&lt;SPAN&gt;" and "&lt;/SPAN&gt;&lt;SPAN&gt;mem_tracker_process_limit&lt;/SPAN&gt;&lt;SPAN&gt;" are for v5.7.x and above (&lt;A href="https://www.cloudera.com/documentation/enterprise/5-10-x/topics/cm_metrics_impala_daemon.html" target="_blank"&gt;https://www.cloudera.com/documentation/enterprise/5-10-x/topics/cm_metrics_impala_daemon.html&lt;/A&gt;). I'm using v5.10, however, when I try to do the Chart Build in CM I can only find the previous 2 metrics though (ie,&amp;nbsp;"tcmalloc_physical_bytes_reserved_across_impalads" and "mem_tracker_process_limit_across_impalads"&amp;nbsp;).&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also from the CM rest api, it seems like those 2 sets of metrics are the same but just different data aggregation format in the returned json&lt;/SPAN&gt;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;S.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2017 21:02:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/impala-query-memory-limit/m-p/58845#M66466</guid>
      <dc:creator>shiyu17</dc:creator>
      <dc:date>2017-08-14T21:02:28Z</dc:date>
    </item>
  </channel>
</rss>

