On Monday, March 11, 2013 4:40:09 PM UTC-5, Tim Moorhouse wrote:
>
> I'm moving from version 2.7.19 to 3.1.0 and am running into an issue with 
> file resources.
>
> All of them using a "source => '...'" attribute to pull their contents 
> from the master are taking about 5 seconds longer than they used to.  These 
> are generally very small files which used to transfer very quickly.  This 
> happens with both webrick and passenger.  If I turn them into templates 
> which don't actually do any substitutions and use a "content => 
> template(...)", then they go back to taking a fraction of a second each.
>
> Given that the evaluation times for each are around 5.05 seconds when they 
> used to be around 0.05 seconds, it looks like they're waiting 5 seconds for 
> something to time out, but I can't figure out what.
>
> Has anyone seen anything like this?
>


It is natural that 'source' would be slower than 'content', even much 
slower.  With 'content', the target file contents are embedded in the 
catalog, whereas with 'source', the agent makes a separate request to the 
server for each file.  Network requests are relatively slow in most 
environments.  I would recommend using 'content' for small files wherever 
possible.  To that end, it may be easier to use the file() function instead 
the template() function when the content you want to serve is completely 
static.

With that said, I don't know why the timing would be so strikingly 
different in 3.1 than it was in 2.7, if everything else is the same.  If no 
one has an answer to that, and you want to troubleshoot it, then I would 
suggest starting by identifying whether the delay is at the master or at 
the agent.  You should be able to tell by checking the file service 
request-to-response turnaround times in the master's logs.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to