statistics eating precious ram

Permalink
kind of forgot openload running all night against my concrete test site… woke up and had a couple of million views… and I first thought that because of the test the site was slow, but then I rebooted the server it had 120 mb ram used - clicked around and everything was the same, and just as I entered the dashboard with the statstics everything slowed down and mem usage went to peak my 256 mb system…

I then trucated the entire pagestatistics table in the db and bam, no wild ram usage…
so… anything crazy going on with the statistics requests? :)

philiph
 
andrew replied on at Permalink Best Answer Reply
andrew
You're right, something is awry with stats, but the problem is really in one spot - the dashboard home page. Right now that graph on the home page is not optimized, and given the nature of the data that it's trying to report, if you get a site that has more than 500,000 rows in that page statistics table (which is not hard to do) computing that chart gets slow, and really gobbles up as much RAM (for its temporary tables) as possible.

Eventually, when we bring the statistics in concrete5 up to par with many of the other systems, this won't be an issue (we'll run a job to summarize these tables so performance is not an issue.) In the meantime, if you're using something like Google Analytics or Mint or something similar, you may find concrete5's statistics overhead unnecessary. You can disable it with this command, in config/site.php

<?php
define('STATISTICS_TRACK_PAGE_VIEWS', false);
?>