Details about the disk system:
There is a free-space reserve requirement, which is a user-configurable parameter given as a percentage of the total space in the file system. The default reserve is five percent. This value is available in the global variable tokudb_fs_reserve_percent. We recommend that this reserve be at least half the size of your physical memory.
TokuDB polls the file system every five seconds to determine how much free space is available. If the free space dips below the reserve, then further table inserts are prohibited. Any transaction that attempts to insert rows will be aborted. Inserts are re-enabled when twice the reserve is available in the file system (so freeing a small amount of disk storage will not be sufficient to resume inserts). Warning messages are sent to the system error log when free space dips below twice the reserve and again when free space dips below the reserve.
Even with inserts prohibited it is still possible for the file system to become completely full. For example this can happen because another storage engine or another application consumes disk space.
If the file system becomes completely full, then TokuDB will freeze. It will not crash, but it will not respond to most SQL commands until some disk space is made available. When TokuDB is frozen in this state, it will still respond to the following command:
mysql> set global tokudb_fs_reserve_percent=4;
ERROR 1238 (HY000): Variable 'tokudb_fs_reserve_percent' is a read only variable
結論
tokudb爲了保障數據庫服務正常,每5秒檢測一次磁盤剩餘空間,默認剩餘5%的時候阻塞寫入,直到釋放更多的空間再恢復正常。經過tokudb_fs_reserve_percent變量控制剩餘百分比,這是個只讀變量。在INNODB,MYISAM等引擎上沒有這個參數可配置,磁盤能夠寫到100%。你們在使用tokudb的時候不要忘記這個參數,磁盤到95%以前就要準備擴容了。