rrit
(Ayke)
March 30, 2025, 7:41pm
1
If the archive table size is huge, check the PHP ini setting serialize_precision
.
This defaults to serialize_precision=-1
since PHP 7.1 - and should not be changed.
If changed the BLOBs in the archive tables become huge.
E.g. serialize_precision=100
results in:
php -r 'echo serialize((float)0.402);
'd:0.40200000000000002398081733190338127315044403076171875;
Also see:
ouvert 07:17PM - 30 Mar 25 UTC
Enhancement
To Triage
## Summary
The php `serialize_precision` ini setting directly influences the BLO… B size and thereby the size of `matomo_archive_blob`-tables.
E.g. `serialize_precision=100` results in:
```bash
php -r 'echo serialize((float)0.402);'
d:0.40200000000000002398081733190338127315044403076171875;
```
With a setting like this the `matomo_archive_blob`-tables really become very huge.
Default setting `serialize_precision=-1` results in:
```bash
php -r 'echo serialize((float)0.402);'
d:0.402;
```
Also see:
https://www.php.net/manual/en/ini.core.php#ini.serialize-precision
Since PHP 7.1 the default is `serialize_precision=-1`.
> -1 means that an enhanced algorithm for rounding such numbers will be used.
For PHP versions < 7.1 the default is `serialize_precision=17` .
## Your Environment
* Matomo Version:
* PHP Version:
* Server Operating System:
* Additionally installed plugins:
More topics about archive table size:
Hello,
Presently running a 60GB piwik db with records over 2 years.
The cost of hosting it is getting exorbitant and for my usage I really only require recent data say 3-6months.
The two tables that take up the most space and date back the furthest appear to be piwik_log_visit & piwik_log_link_visit_action.
Are these the right DB’s to truncate in order to trim the Piwik DB? On a mirror of my production DB, I’m presently testing deleting all records older than 90days from both tables and as e…
Hello.
I use Piwik 1.8.2 and a separate database server (Percona Server 5.5, 6Gb Ram, DB - 12Gb). Every night after cleaning old data maintenance script runs command “optimize table”. I use InnoDB and InnoDB does not support optimize table. This command is executed for a long time and the server hangs.
How can I disable optimize table?
Hello fellow matomo fans,
In advance I want to apologize in case this is a duplicate question. I couldn’t find any answers to my questions via search.
I’ve got the problem, that the archive_blobs for some months are getting absolutely huge. There where no major changes to the amount of visitors tracked in these months. I attach a screenshot of the database size.
[Screenshot 2020-04-07 at 10.23.31]
I have tried ./console core:purge-old-archive-data all without any improvement result.
I also …
We are running a large installation of Piwik. Tracking approaching 700 sites, relatively low traffic individually.
We have archive script running successfully, until recently we’ve had no problems wit this, and all running smoothly. In the last few months we’ve noticed the Archive_blob report tables have become very large, despite no corresponding increase in traffic.
As an example, in May we tracked
Total: 570779 visits, 2747116 pageviews
resulting in the following archive table with tot…
so we run archive.sh every morning with great faith, and it does run properly, but we still have many huge archive_blob tables sitting around
ie (table sizes in KB)
piwik_access size: 627
piwik_archive_blob_2008_01 size: 2483605
piwik_archive_blob_2008_06 size: 1
piwik_archive_blob_2008_07 size: 19219035
piwik_archive_blob_2008_08 size: 19539387
piwik_archive_blob_2008_09 size: 22205579
piwik_archive_blob_2008_10 size: 24984425
piwik_archive_blob_2008_11 size: 22972165
piwik_archive_blob_2008_…
After 2018, our archive tables started getting very large.
We are running 4.4.1, but I’m not sure what happened/started back in 2019
[image]
select count(*) FROM piwik_archive_blob_2018_12;
4212 rows
SELECT COUNT(*) FROM piwik_archive_blob_2019_01;
902488 rows
These are very different
SELECT COUNT(NAME),NAME FROM piwik_archive_blob_2018_12 GROUP BY NAME;
155 rows
SELECT COUNT(NAME),NAME FROM piwik_archive_blob_2019_01 GROUP BY NAME;
701 rows
[image]
I see the prevalence of Goal…
1 Like