High resource usage

(Bernard St-Pierre) #1

Let me try this again but will make it shorter. My question is:

Can the simple act of looking at Piwik stats in a browser cause a High CPU usage on server due to requests of live widget? If so, then what is the suggestion as to settings that should be looked into and modified to lower the amount of requests?

Bernard St-Pierre

(Matthieu Aubry) #2

What does Mysql show FULL processlist \g say?
do you have slow errors logged in your mysql slow query log


My host provider is also complaining about Piwik saying my account has exceeded their “resource usage policy”. They have also pointed out that it’s the Live section of Piwik that is making too many calls. This is for a couple of very low traffic websites.

Their resource usage policy is as follows:

I’m surprised not more people complain about this. I’ve had Piwik installed for a couple of years and have been upgrading since. As far as i can remember, it has only become an issue since the introduction of the Live Map widget. Would a fresh install (while keeping the data) potentially solve this?

(mike) #4

Hi organicAnt. I’m surprised Matt didn’t mention this already, but yes, looking at Piwik in your browser can indeed cause some major backend processing like you’re seeing, and yes, there are settings to work with this.

There are two ways that Piwik can summarize and generate reports. The first is when you browse the Piwik interface, it can generate the reports on as you do so:

Pro: The reports are 100% accurate with no delay.
Con: The reports must generate when you reload the page, go forward and backward, etc.
Con: Reports can take a lot of processing to generate.
Con: Your browsing can be significantly slower, depending on your traffic.

The second way that Piwik can summarize and generate reports is via an “archive script” that you set up as a cron job.

Con: Less accurate when browsing due to the delay of the cron job.
Pro: Less processing overall – reports are generated only as often as configured
Pro: Faster browsing

There’s an FAQ that describes how to set this up.


You might also want to check out the FAQ on tweaking MySQL:


Good luck.


Hi Mike,

Thanks for the explanation. I was under the impression that cron job setup was only necessary for high traffic websites. What I like the most about Piwik is the live statistics so it’ll be a shame to loose those to a cron job : (

Is really no way of optimising it while keeping the live features? I was hoping a re-install would somehow improve its performance.

Thank you.

(mike) #6

I can’t imagine a re-install will make any difference.

May I ask what kind of traffic you get?


An average of 25 visits a day latelly. Although there have been a few peaks of over 100 visits a day in the 2 years the website has been up.

I’m also tracking a second website, which gets even less traffic.

(mike) #8

Wow, yeah, that really shouldn’t require the archive script. Maybe somebody else will have some ideas, but can you tell us what version this is on?


Exactly my thought.

It’s the most recent version. Just upgraded a few days ago.


I have a Piwik server that process 50 000 pageviews a day and archiving every 15 minutes so It’s “almost real-time” and my Piwik installation run smoothly.