<?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: Solr Swap Memory exceeding threshold in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Solr-Swap-Memory-exceeding-threshold/m-p/339115#M233039</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/11191"&gt;@araujo&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The problem went away as soon as I restarted Solr, but I'd still like to understand what it was and if there's a better/permanent solution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please find below the output of your mentioned command "&lt;SPAN&gt;sar -r 5 12"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AzfarB_1-1647955497857.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/33974i31B1855BA1033A15/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AzfarB_1-1647955497857.png" alt="AzfarB_1-1647955497857.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the master node and there are quite a number of roles currently running here. Please find their list below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HBASE Gateway&lt;BR /&gt;HIVE Gateway&lt;BR /&gt;HDFS Gateway&lt;BR /&gt;HIVE on TEZ Gateway&lt;BR /&gt;Hue Server&lt;BR /&gt;Kafka Gateway&lt;BR /&gt;Oozie Server&lt;BR /&gt;Ranger Admin&lt;BR /&gt;Ranger Tagsync&lt;BR /&gt;Ranger Usersync&lt;BR /&gt;Solr Server&lt;BR /&gt;Spark Gateway&lt;BR /&gt;SQOOP_Client Gateway&lt;BR /&gt;Streams Messaging Manager Rest Admin Server&lt;BR /&gt;Streams Messaging Manager UI Server&lt;BR /&gt;Tez Gateway&lt;BR /&gt;YARN Gateway&lt;/P&gt;</description>
    <pubDate>Tue, 22 Mar 2022 13:25:30 GMT</pubDate>
    <dc:creator>AzfarB</dc:creator>
    <dc:date>2022-03-22T13:25:30Z</dc:date>
    <item>
      <title>Solr Swap Memory exceeding threshold</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Solr-Swap-Memory-exceeding-threshold/m-p/339103#M233034</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi Everyone!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I've been receiving the following error on my Cloudera Manager.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;"603.1 MiB of swap memory is being used by this role's process. Warning threshold: 200.0 MiB."&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AzfarB_0-1647940735842.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/33971iC3E5AC4C3A769F67/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AzfarB_0-1647940735842.png" alt="AzfarB_0-1647940735842.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried removing Solr collections by going to the following location and running the following query.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://&amp;lt;HOST" target="_blank" rel="noopener"&gt;http://&amp;lt;HOST&lt;/A&gt;NAME&amp;gt;:8993/solr/#/ranger_audits/documents&lt;BR /&gt;&amp;lt;delete&amp;gt;&amp;lt;query&amp;gt;evtTime:[* TO NOW-0DAYS]&amp;lt;/query&amp;gt;&amp;lt;/delete&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But it's not having any effect on the Swap memory usage.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AzfarB_1-1647941524804.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/33972iD87775EC47272A77/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AzfarB_1-1647941524804.png" alt="AzfarB_1-1647941524804.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.S. Swappiness is set to 1 as when I run&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;cat /proc/sys/vm/swappiness&lt;/PRE&gt;
&lt;P&gt;The output generated is 1.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Cluster Details :&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Solr:&amp;nbsp;&lt;SPAN&gt;8.4.1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Hadoop 3.1.1.7.1.6.0-297&lt;/P&gt;
&lt;P&gt;CDH-7.1.6&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2026 07:59:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Solr-Swap-Memory-exceeding-threshold/m-p/339103#M233034</guid>
      <dc:creator>AzfarB</dc:creator>
      <dc:date>2026-04-21T07:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: Solr Swap Memory exceeding threshold</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Solr-Swap-Memory-exceeding-threshold/m-p/339104#M233035</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/96750"&gt;@AzfarB&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which other roles are running on the same node as this Solr role?&lt;/P&gt;&lt;P&gt;Could you provide the output of a "sar -r 5 12" command?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;André&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 10:25:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Solr-Swap-Memory-exceeding-threshold/m-p/339104#M233035</guid>
      <dc:creator>araujo</dc:creator>
      <dc:date>2022-03-22T10:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: Solr Swap Memory exceeding threshold</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Solr-Swap-Memory-exceeding-threshold/m-p/339115#M233039</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/11191"&gt;@araujo&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The problem went away as soon as I restarted Solr, but I'd still like to understand what it was and if there's a better/permanent solution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please find below the output of your mentioned command "&lt;SPAN&gt;sar -r 5 12"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AzfarB_1-1647955497857.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/33974i31B1855BA1033A15/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AzfarB_1-1647955497857.png" alt="AzfarB_1-1647955497857.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the master node and there are quite a number of roles currently running here. Please find their list below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HBASE Gateway&lt;BR /&gt;HIVE Gateway&lt;BR /&gt;HDFS Gateway&lt;BR /&gt;HIVE on TEZ Gateway&lt;BR /&gt;Hue Server&lt;BR /&gt;Kafka Gateway&lt;BR /&gt;Oozie Server&lt;BR /&gt;Ranger Admin&lt;BR /&gt;Ranger Tagsync&lt;BR /&gt;Ranger Usersync&lt;BR /&gt;Solr Server&lt;BR /&gt;Spark Gateway&lt;BR /&gt;SQOOP_Client Gateway&lt;BR /&gt;Streams Messaging Manager Rest Admin Server&lt;BR /&gt;Streams Messaging Manager UI Server&lt;BR /&gt;Tez Gateway&lt;BR /&gt;YARN Gateway&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 13:25:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Solr-Swap-Memory-exceeding-threshold/m-p/339115#M233039</guid>
      <dc:creator>AzfarB</dc:creator>
      <dc:date>2022-03-22T13:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: Solr Swap Memory exceeding threshold</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Solr-Swap-Memory-exceeding-threshold/m-p/339130#M233050</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/96750"&gt;@AzfarB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think it is quite common for modern linux kernel to move some inactive pages into swap to bring down memory footprint.&lt;/P&gt;&lt;P&gt;As long your application or Solr not having any performance issue, I would not concern much on the swapping and I would just increase the threshold.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;rgds,&lt;/P&gt;&lt;P&gt;Ram.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 17:03:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Solr-Swap-Memory-exceeding-threshold/m-p/339130#M233050</guid>
      <dc:creator>ram76</dc:creator>
      <dc:date>2022-03-22T17:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Solr Swap Memory exceeding threshold</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Solr-Swap-Memory-exceeding-threshold/m-p/339810#M233185</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/96750"&gt;@AzfarB&lt;/a&gt;,&amp;nbsp;Has any of the replies helped resolve your issue? If so, can you please mark the appropriate reply as the solution?&amp;nbsp; It will make it easier for others to find the answer in the future.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 05:56:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Solr-Swap-Memory-exceeding-threshold/m-p/339810#M233185</guid>
      <dc:creator>VidyaSargur</dc:creator>
      <dc:date>2022-03-28T05:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: Solr Swap Memory exceeding threshold</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Solr-Swap-Memory-exceeding-threshold/m-p/339886#M233201</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/96750"&gt;@AzfarB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for using Cloudera Community. Based on the Post, Your Team observed Solr-Infra JVM reporting WARNING for Swap Space more than 200MB being utilised. Restarting the Solr-Infra JVM ensured the WARNING went away.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that Swapping isn't Bad in general &amp;amp; the same has been discussed in detail by Community in [1] &amp;amp; [2]. Plus, Deleting RangerAudits Documents won't affect the same as Solr uses JVM as documented [3]. Indexed Documents aren't persisted in Memory unless Cached, thereby ensuring Deletion won't fix the Swapping guaranteed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As your Screenshot shows, the Host itself is running short on Memory (~99% Utilised) &amp;amp; Overall Swap is ~80% at ~47GB, out of which Solr-Infra is contributing &amp;lt;1GB. As documented in the below Links, Your Team can focus on the Host Level Usage &amp;amp; Considering Increasing the Swap Threshold from 200MB to at least 10% of the Heap i.e. 2GB for a Warning.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;01 additional point can be made as to why Solr-Infra Restart helped resolved the WARNING. This needs to be looked at from the Host perspective as to the amount of Memory freed &amp;amp; Whether the Overall Swap Usage reduced at Host Level after Solr-Infra Restart as opposed to Solr-Infra WARNING&amp;nbsp;being suppressed only.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards, Smarak&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[1]&amp;nbsp;&lt;A href="https://unix.stackexchange.com/questions/2658/why-use-swap-when-there-is-more-than-enough-free-space-in-ram" target="_blank"&gt;https://unix.stackexchange.com/questions/2658/why-use-swap-when-there-is-more-than-enough-free-space-in-ram&lt;/A&gt;&lt;/P&gt;&lt;P&gt;[2]&amp;nbsp;&lt;A href="https://chrisdown.name/2018/01/02/in-defence-of-swap.html" target="_blank"&gt;https://chrisdown.name/2018/01/02/in-defence-of-swap.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;[3]&amp;nbsp;&lt;A href="https://blog.cloudera.com/apache-solr-memory-tuning-for-production/" target="_blank"&gt;https://blog.cloudera.com/apache-solr-memory-tuning-for-production/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 08:00:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Solr-Swap-Memory-exceeding-threshold/m-p/339886#M233201</guid>
      <dc:creator>smdas</dc:creator>
      <dc:date>2022-03-29T08:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: Solr Swap Memory exceeding threshold</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Solr-Swap-Memory-exceeding-threshold/m-p/340947#M233404</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/96750"&gt;@AzfarB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We hope the above Post has helped answer your concerns &amp;amp; offered an Action Plan to further review. We are marking the Post as Resolved for now. For any concerns, Feel free to post your ask in a Post &amp;amp; we shall get back to you accordingly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards, Smarak&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 07:17:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Solr-Swap-Memory-exceeding-threshold/m-p/340947#M233404</guid>
      <dc:creator>smdas</dc:creator>
      <dc:date>2022-04-08T07:17:24Z</dc:date>
    </item>
  </channel>
</rss>

