Populating a Directory from UNC performs wretchedly while 'building file list'

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of ian ian 2 years, 1 month ago.

  • Author
  • #26475
    Profile photo of ian

    I'm trying to poplulate a directory on my servers using the File resource type, as follows:

    File ToolsDir
    Type = "Directory"
    DestinationPath = $Node.ToolsDirDestinationPath
    SourcePath = $Node.ToolsDirSourcePath
    Ensure = "Present"
    MatchSource = $True
    Recurse = $True
    Force = $True
    Credential = $Credential
    Checksum = "modifiedDate"

    This works –but the performance is extremely poor, in that the client spends an inordinate amount of time 'building file list without using cache'.

    Anyone know how to make the client use a cache, or to otherwise speed up this process?

    Or maybe they've fixed this in WMF5?

    Many Thanks.

  • #26476
    Profile photo of Dave Wyatt
    Dave Wyatt

    Hard to say; the File resource is the only one written in native code, so we can't really see what's going on there.

    I can tell you that the DSC cache folder is also automatically cleared every time a new version of the configuration is applied with Start-DscConfiguration, or when a new version is downloaded from the pull server. So the cache only really helps when the system is being checked for drift from an existing configuration.

  • #26479
    Profile photo of ian

    Thanks for the reply. I've removed this from my configuration for now.
    I really need this to work, so I'm going to try write up a custom resource that simply uses robocopy mirroring if a checksum file differs in its content.

You must be logged in to reply to this topic.