Purge DB very slow on high database

Hello,

I installed Piwik in order to have sites with a lot of traffic (Daily Total: 824,878 visits, 10,813,986 pageviews, 26,983,898 actions)
At the moment i’m using a Percona 5.7 database with tokudb which helps me save an enourmous amount of disk space while still providinga good response time
The site has been up for about a month and i configured piwik to keep 14 days woth of logs. The problem is that the automatic log clean-up (once a week and keep the 14 most recent days) is very very long and that the data is not erased quickly enough before the log import of the following morning (i am importing the log files using the script import_logs.py once a day).

Current state of my DB :
Current database size: 80.1 G
Estimated database size after purge: 64.4 G
Estimated space saved: 15.7 G

Even when i use the button “Purge DB Now” the data is neither erased quickly nor immediately.
Does someone have a solution to erase log data older than X days rapidly at the data-base level ?
Thanks in advance.

Regards,
Velborg

Hi,

Anyone helping me with this ?
What i need is a fast DB purge on old data, actually my database is more than 100 G.

Regards,
Velborg

Hi there, would you mind creating an issue in our tracker: Issues · piwik/piwik · GitHub - it sounds like a bug or issue we may need to address. If you are in a hurry to get help and this problem fixed, you can contact the support team at: We offer support subscriptions for businesses worldwide to make the most out of Piwik analytics. - Analytics Platform - Piwik