HIGH CPU USAGE BY

It is very important khổng lồ optimize everything possible for BizTalk archive sầu the best performance it can, especially if you are dealing with BizTalk Server DEV environments on Azure using Azure Virtual Machines. Again, as I explain in a previous post (here), we normally tkết thúc khổng lồ be careful in choosing the VM Disk type và VM sizes mostly because of the price, so tuning the machine is very important, otherwise sometimes they tover khổng lồ be a little slow & even the most insignificant things (that we think they are) can have sầu a huge impact on BizTalk Server performance. One of the cases that I found these days was the .NET Runtime Optimization Service causing high CPU usage…



… Indeed, & we don’t need to lớn give explanations to explain that everything that may affect the CPU to cause a High Load (or usage) inherently affects & cause huge impact on BizTalk Server performance.

Bạn đang xem: High cpu usage by

The .NET framework is regularly optimized by Microsoft using the .NET Runtime Optimization Service to make sure you get the best out of the system libraries and this is also done for your installed managed application. It is also more or less responsible for precompiling .NET assemblies in the background. Once it’s done, it will go away. And while you may see CPU usage almost near the 100%, the compilation happens in a process with low priority, so it tries not lớn steal the CPU for other processes you are doing. Once everything is compiled, assemblies will now be able lớn cốt truyện pages across different processes and warm startup will be typically much faster.

Again, once the .NET Runtime Optimization Service once the service finishes his process it will go away, but in my case, this process was already running several hours, so instead of waiting until for the computer khổng lồ idle, we can force it lớn compile everything now! Solving this “issue” in a fast way (a couple of minutes). For that you should:

mở cửa a comm& prompt as administrator and run the adsutil comm&. To bởi this, press the “Windows key” khổng lồ open the Start menu và type “cmd” on the Start Search box, right-click on “Command Prompt” và select from the context thực đơn the “Run as administrator” option.And change to lớn the following folder: “C:WindowsMicrosoft.NETFrameworkv4.0.30319” or “c:WindowsMicrosoft.NETFramework64v4.0.30319” (on a 64-bit operating system)Type “nren.exe pháo executequeueditems”, and press ENTERWait until the operation is finished, I think you may receive sầu the following message at the command prompt: “All compilation targets are up khổng lồ date.”

This will process all pending work. Once this is done, the service will shut down, as it has nothing else to lớn vị và you will see that the CPU will be baông xã to lớn the normality.



This can be important to be aware for the Administration team (or DevOps team) while planning your .NET framework update to make sure that everything runs smoothly especially in the production environment, otherwise this can be one of the reasons (at least for a few minutes or hours) for you notice that our production applications are running a little slowly.

Xem thêm: Get A Free Avast Internet Security 20, Avast Internet Security 20

There is also a PowerShell provide by the Microsoft .NET team lớn speed up the optimization service: DrainNGenQueue.ps (see more here)


*

Author: Sandro Pereira

Sandro Pereira lives in Portugal và works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarquả táo both on-premises và cloud for various clients, each with different scenarquả táo from a technical point of view, form size, & criticality, using Microsoft Azure, Microsoft BizTalk Server & different technologies lượt thích AS2, EDI, RosettaNet, SAPhường, TIBCO etc.He is a regular sydneyowenson.comger, international speaker, & technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVPhường. since 2011 for his contributions to lớn the integration community.View all posts by Sandro Pereira


8 thoughts on “BizTalk Assessment: .NET Runtime Optimization Service causing high CPU usage”


*
Bogdan “Daniel” Craciun says:

Thanks for the tip. Worked.

Also worth mentioning that these KB’s cause the issue

.Net framework update

OS version

KB4338420

Windows Server 2008

KB4338606

Windows Server 2008 R2

KB4054542

Windows Server 2012

KB4054566

Windows Server 2012 R2

KB4054590

KB4338814

KB4338419

KB4338605

KB4345418


Leave sầu a Reply Cancel reply

Your tin nhắn address will not be published. Required fields are marked *

Comment

Name *

E-Mail *

Website

Save sầu my name, gmail, and website in this browser for the next time I bình luận.


*

As BizTalk Consultant I"m also available for training, assessments or implementing any BizTalk project. call or skết thúc me an email if you have sầu any questions.
sandro.pereira
devscope.net +351 223 751 350

Categories

Tags


AdaptersAdministrationAPI ManagementAzureAzure App ServiceBAMBizTalkBizTalk 2010BizTalk AdministrationBizTalk MapperBizTalk ServerBizTalk Server 2013BizTalk Server 2013 R2BizTalk Server 2016BizTalk Server 2020ConfigurationConfigurationsCustom FunctoidsDeployDeveloperDevelopingErrors & Warnings Causes and SolutionsEventsFunctoidsIconsInstallationIntegrationLogic AppsMapMapperMappingMicrosoft AzureMicrosoft FlowMicrosoft IntegrationMonitoringPowerAppsnguồn BIPowerShellService BusShapeSpeakerSQL ServerToolsVisioVisual Studio