On Thu, Mar 19, 2015 at 10:27 PM, Reindl Harald <h.rei...@thelounge.net>
wrote:

>
> 1. Optimize table rewrites the entire table into a new file. This means
>> you'll need about 110G-150G of storage space to be able to perform this
>> action in the first place
>>
>
> sadly yes, maybe it's too late


I can provision new space for the device, so not too late :)


>  2. In the process the table will be locked, and rewriting 110G of data
>> will take a while. In this time you won't be able to write to this
>> table. Every new message delivery will cause a new MySQL thread waiting
>> for the table optimize to be over. Depending on how many incoming emails
>> you get, you could run out of connections (see max_connection) and your
>> reading clients (pop3) won't be able to connect.
>>
>
> before MySQL 5.6 it's easy to weight: just shutdown mailservices for that
> time because it affects also sent-mail and drafts


I can use (percona tools) pt-online-schema-change todo the same thing as
Optimize, but without locking.

3. Unless you are using the MySQL server for something else too (you
>> shouldn't) the space is not really wasted. The dbmail_messageblks.ibd
>> file is managed by innodb and contains empty spaces. They get filled
>> with new emails. Until your server reaches 500GB of messageblks data,
>> the file won't grow
>>
>
> that's not true, there is overhead too


Yes.. in this case there is about 100MB of free data (SUM of Data_free),
and the tables come to 500GB (SUM of SUM of Data_length).

I performed a mysqldump of the entire DB (there is only the one database on
the server, except for mysql that is), and the size of the file is 393G..
so the difference between the database size and the dump file is approx
100GB.

What im trying to understand is why is the SUM of curmail_size is approx
110GB, yet the database size (even dump'ed) is 400GB. Surely dbmail does
not have that much overhead in its database?

Thanks!

Simon
_______________________________________________
DBmail mailing list
DBmail@dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail

Reply via email to