This topic contains 5 replies, has 4 voices, and was last updated by
December 9, 2016 at 9:07 pm #59943ParticipantPoints: 0Rank: Member
When we use the Registry resource vs Script resource to set state for a Registry entry, the WmiPrvSe.exe process spikes to 50% and it takes over 1 minute to enact. The same registry setting set with Script resource takes 5 seconds. It has improved with xPSDesiredStateConfiguration module v5.0. Registry resource took 35 seconds vs 61 seconds. And Script resource actually went up from 5 seconds to 11 seconds.
Has anyone experienced this same issue with the Registry Resource in their configurations?
Can the Registry resource time be improved?
December 12, 2016 at 6:48 pm #60006KeymasterPoints: 1,704Rank: Community Hero
Well, the Registry resource is presently open source, so you could certainly pop it open and have a look. Without knowing what you're doing in the registry, it's hard to say. For example, anything in the USER keys could be the result of the LCM starting without that set loaded, and so it has to burn time spinning it up. But you might look and see what code the resource is using, versus what you're doing in your Script resource.
December 12, 2016 at 8:52 pm #60058ParticipantPoints: 0Rank: Member
@Connie T, I'm having the same issue see (https://powershell.org/forums/topic/every-registry-resource-takes-25-seconds-to-set/). I still haven't been able to pin point exactly what the issue is. It appears to be very deep inside the Registry resource. If I use a Script resource to change the exact same registry setting it takes under second.
Installing .NET 4.6.2 and WMF 5.1 Preview seems to have improved things. Can you verify the same?
I'd also be interested to know what AV solution you're using and backend hardware?
January 22, 2017 at 9:59 pm #62404ParticipantPoints: 0Rank: Member
The problem is described here: https://windowsserver.uservoice.com/forums/301869-powershell/suggestions/13703175-get-psdrive-abnormal-i-o
If you are on Azure, the fact that registry takes a long time may not be a biggest of your problems:
This bug is fixed in WMF5.1 but there is also a workaround available.
Long story short – it requires cleaning up module cache, namely all files in:
We went down from ## seconds to milliseconds.
January 22, 2017 at 10:15 pm #62406ParticipantPoints: 0Rank: Member
I can confirm xRegistry is now apply in milliseconds with PS 5.1. Finally it's fixed!
January 23, 2017 at 3:01 pm #62439ParticipantPoints: 0Rank: Member
Hi Bartek and Zuldan, thanks for the reply and follow up to this post. I'll test today to confirm too!
The topic ‘DSC Registry Resource Performance Issue’ is closed to new replies.