我的挑战是在给定的ZFS池上存储尽可能多的mysql转储。
My challenge is to store as many mysql dumps as possible on a given ZFS pool.
池本身已启用**重复数据删除和压缩**。 对于存储多个版本的转储,使用快照(每15分钟,每小时,每天,每周和每月)。
The pool itself has **dedup and compression enabled**. For storing multiple versions of the dumps snapshots are used (every 15 min, every hour, every day, every week and every month).
MySQL服务器上各种数据库中的大多数表都在增长,并且不会经常更改。 我的想法是每个表而不是每个数据库进行转储,以使zfs有机会在块级别进行重复数据删除。
Most of the tables in the various databases on the MySQL Server are growing and do not change very often. My thinking was to do a dump per table instead of per database to give zfs a chance to dedup on block-level.
备份脚本使用mysqldump的输出并将其传送到文件(使用 `mysqldmup -u $ user -p $ pass $ db $ table> $ outputfile.sql`
The backup script uses the output of mysqldump and pipes it to a file (with `mysqldmup -u$user -p$pass $db $table 》 $outputfile.sql`
* ZFS重复数据删除是否能够以合理的速率从stdout中重复删除流?
* 是否应手动配置目标数据的块大小? (如果是 - 哪个尺寸?)
* 应用某种输出缓冲(除线缓冲之外)?
* 来自重定向同步或异步的写入吗?
* Is ZFS dedup able to dedup a stream from stdout at a good rate?
* Should the blocksize of the destination datased be configured manually? (and if yes - which size?)
* Shoud some sort of output buffering (other than line buffering) be applied?
* Are the writes from a redirect sync or async?
编辑以确定它:如果内容是(几乎\[例如,只有最后一行不同\]),那么必须使文件逐行写入,就像复制的文件一样?
EDIT to nail it down: What is necessary to make a file written line by line dedup like a file that was copied if contents are (almost \[eg. only last line differs\]) the same?