Skip to main content

Apache Solr Memory Adjusment

This article will describe how to change the default memory allocation of Apache Solr version 8.4.
I believe that you can do the same changes in other Solr versions as well. 

By default, the "bin/Solr" script sets the maximum Java heap size to 512M (-Xmx512m), which is fine for getting started with Solr. For production, you’ll want to increase the maximum heap size based on the memory requirements of your search application. When you need to change the memory settings for your Solr server, use the variable in the include file.
How to do it;
For the Windows; we need to change the SOLR_JAVA_MEM variable as;
1. open the "solr.cmd' file in the solr\bin folder from a text editor and find SOLR_JAVA_MEM variable in the file;



2. I change it as below and restarted the Solr Service
SOLR_JAVA_MEM = "-Xms1024m -Xmx4400m"
Then you can see the changed memory details from Solr Dashboard.





3. for the Linux distributions you need to do the changed of solr/bin/solr.in.sh file





Comments

Popular posts from this blog

PowerShell script to update computers' “Description” field

Hello All, There are some requirements to update Active Directory Computer's Description field with the computer details like Vender, Identification number/Serial number, Operation system installed to date, etc.. How to do this? Of course, we will use PowerShell to perform this task. Also, be aware that we can do this for Active Directory User's description field as well. $computers = Get-Content C:\PSScript\Description\coplist.txt $output = foreach ($computer in $computers) { $WMI=Get-WMIObject -ComputerName $Computer Win32_ComputerSystemProduct $vendor = $wmi.Vendor.name $name = $wmi.Name $identifyingNumber =$wmi.IdentifyingNumber #$InstallDate = ([WMI]'').ConvertToDateTime((Get-WmiObject -ComputerName $computer Win32_OperatingSystem).InstallDate) $vendor $name $identifyingNumber #$InstallDate #get current Description details $CurrentDescription = (Get-ADComputer $computer -Properties * | Select -Property Description).description $Current...