Rethink concept of Space Projection calculation

Issue #1083 resolved
Torsten Kruse created an issue

We actually migrated our piler installation to a new server. After everything is up and running for some weeks now, we realized that the Space Projection calculation tells us disk will be full in 22 days. Argh!

We checked the other values:

mails per day: 249

average mail+meta+index size: 63k

So we should need 63k*249 = 15 MB per day.

But the piler UI says the daily average disk size requirement is 3 GB.

So what?

After checking the code, we found this line in controller/health/worker.php:

\$averagesizedayraw = ($averagemessagesizeraw + $averagesqlsizeraw + $averagesphinxsizeraw) * $averagemessagestotalraw;

with

\$averagemessagestotalraw = $this->data['counters']['rcvd'] / $total_number_days;

and

\$total_number_days = round( (time() - $this->model_health_health->get_first_email_arrival_ts()) / 86400 );

So it looks like because of our migration the first mal arrived just some week ago, although our archive contains mails from more than 10 years.

I replaced averagemessagestotalraw with averagemessagesmonthraw and now the UI state about 16 MB disk requirement per day and our 65 GB disk space left will last for about 12 years. Fine. 🙂

So in the end I would like to propose the calculation in piler should be changed this way.

Argument 1: migrations as I described above

Argument 2: companies get larger or smaller over time. I the archive was used by 1000 users years before and 10 now, this full average will always be to high. And if there were 10 users years before and 1000 now, the average will be to low. So the monthly average should provide a better value than the total average for further Space Projection calculation.

Comments (5)

  1. Log in to comment