After installing Azure DevOps 2020, after startup, you find that the search service has a particularly high memory and CPU usage, as shown in the following figure:
Review the article on ES:
Azure DevOps 2020 is using elasticsearch v6.2 version, try to find the ES service, the service command is as follows:
"D:\Program Files\Azure DevOps Server 2020\Search\ES\elasticsearchv6.2\bin\elasticsearch-service-x64.exe" //RS//elasticsearch-service-x64 Try to modify the jvm.options configuration with the path to: D:\Program Files\Azure DevOps Server 2020\Search\ES\elasticsearchv6.2\config, the default is 2400M as shown in the figure below:
The size of the minimum heap and the size of the largest heap should beEqual。
The more heap Elasticsearch gets, and the more cache the memory can use. However, it is important to note that too many items are allocated to you, which will lead to long garbage collection stops.
Set the maximum heap value to no more than 50% of your physical memory, make sure you have enough physical memory to ensure the kernel file cache.
Resources:The hyperlink login is visible.
Set the initial and maximum memory to 1200M as follows:
After saving the modifications, we restarted the Elasticsearch service and found that the memory still occupied more than 2G, which could not solve our problem.
By setting the _JAVA_OPTIONS environment variable to limit the memory size, the ES service is found to be unable to start.
--------------------------- service --------------------------- The Elasticsearch 6.2.4 (elasticsearch-service-x64) service on your local machine stops after starting. Some services will automatically stop when not used by other services or programs. --------------------------- Are you sure --------------------------- Looking at the startup log, the error is as follows:
2020-09-01 21:23:50 Commons Daemon procrun stdout initialized Error occurred during initialization of VM Initial heap size set to a larger value than the maximum heap size
The final solution is as follows Go to the bin directory of the program and run the following command:
Pop up the configuration, switch to the Java tab, modify the configuration items as shown below, and click the application to confirm.
I found that the memory has been lowered, as shown in the figure below:
(End)
|