On Sep 16, 2010, at 5:31 AM, Ben Tullis wrote:

> Our problem is that the dashboard is just getting slower and slower as
> time goes by, and the database is becoming swamped. It's a concern now
> that it has become such a key tool.
> 
> Can anyone enlighten me as to whether there is any housekeeping that can
> be done to the dashboard database, in order to make the application any
> faster?

We had the same issues. I have this in `/etc/cron.daily` which blows away all 
but the last 14 days of activity for Dashboard.

    #!/bin/sh
    
    # filesystem
    /usr/bin/find /var/lib/puppet/reports/ -type f -mtime +60 -exec rm {} \;
    # these directories should be empty after the previous command
    /usr/bin/find /var/lib/puppet/reports/ -maxdepth 1 -mtime +60 -type d -exec 
rmdir {} \;
    
    # dashboard database
    /usr/bin/rake -f /opt/puppet-dashboard/Rakefile RAILS_ENV=production 
reports:prune upto=14 unit=day

I would start higher and crank it down until you get acceptable performance. 
I'd like to have more than 14 days honestly, but it was just too slow 
otherwise. (You'll note that I keep 60 days worth of YAML reports, so I could 
always import those if I really needed the data in the Dashboard.)

-- 
Rob McBroom
<http://www.skurfer.com/>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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.

Reply via email to