On 24/01/11 20:57, Patrick wrote: > On Jan 24, 2011, at 9:14 AM, Daniel Piddock wrote: > >> Dear list, >> >> I'm attempting to mirror a folder containing a few large files from an >> NFS location to the local drive. Subsequent runs take a lot longer than >> I'd have expected, after the first run. >> >> Using the following block a puppet apply run is currently taking 30 seconds: >> file { '/usr/share/target': >> source => 'file:///home/archive/source/', >> recurse => true, >> backup => false, >> checksum => mtime, >> } >> >> There are 42 files taking up 870MB. I'd have thought stating the files >> in the source and target, comparing to each other (or a cache internal >> to puppet as it doesn't set the mtime on files) would be a lot faster >> than it is. >> >> I was curious about what puppet was up to, so ran it in strace. It's >> reading every file every run, multiple times! Reads the target twice, >> then the source twice before reading the target again. Considering I >> wasn't expecting it to open any of the files at all this is total over kill. >> >> Is this horribly bugged or have I got a magic incantation that's causing >> this behaviour? strace is rather verbose and I haven't exactly read all >> 80MB of the dump line by line. >> >> Is there a neater way of just mirroring a folder based on modification >> time? I suppose the easiest route would be an exec of rsync, at least I >> have control over that. >> >> I'm using Puppet 2.6.4. >> >> Dan >> I especially like the way Ruby searches for and loads the md5 library >> every time it's used. What a performant language. > This sounds like a bug to me. I do know that I never use recurse=true except > when neccisary myself because it's too slow. In your position, I would > replace it with an rsync and file a bug. > > Also, does it behave this badly when no changes are made or just when making > changes
This happens every single run, source and target have not changed state. I tried stracing when just a single file is copied. Puppet is still reading both source and target when checksum => mtime is used, although just the once. I think there might be two bugs here - checksum does not work with timestamps and recurse is horribly broken. Puppet issues 6003 and 6004 raised. Dan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.