Pavel's Rails Load Stats script

Hello,

I think this tool hasn’t been introduced to our community yet. Red Hat engineers created few scripts which are a good starting point when investigating performance issues. The best one out there is probably @pmoravec 's Rails Load Stats:

I would like to encourage Pavel to continue improving the script, particularly better tabular output would be great. And I would like to hear what folks think about bringing this into Core repo and running this from cron or systemd everynight on the last day logs for all deployments. What you think?

Pavel, can you estimate or better test how much memory and time it takes to process the biggest log you have available (from one of our biggest customers)? We do not want to eat let’s say 2 GB of memory overnight, but if that’s a reasonable value, having opportunity just to ask for /var/log/foreman/production.log-20200102-report could be invaluable. We could even gather these with sosreport/foreman-debug so they are instantly available for you guys for a quick estimate for hot issues.

Thanks for this scripts, we’ve already used it multiple times in the last couple of weeks.

Shipping this in extras/ would be fine I think but a cronjob doesn’t make sense unless someone looks at it. Having sosreport generate this makes sense and shipping it in foreman.rpm/deb makes that easier.

1 Like

Well, that’s chicken and problem I guess. Unless there is anything to look at, nobody will take a look. We could start building it and advertising it in Foreman, blog, documetnation. Performance is important aspect of our project and now since we have a stable and mature codebase (ehm) it is worth effort.

Having said that, Pavel told me that the biggest logs he has can take up to an hour of processing and 700MB of memory. Luckily, there is an existing (similar) tool written in Golang. I will get back to this once I have more info.