Impossible compression ratio on ZFS
Jeremy Chadwick
freebsd at jdc.parodius.com
Mon Jun 13 09:48:05 UTC 2011
On Mon, Jun 13, 2011 at 10:13:33AM +0100, Steven Hartland wrote:
> I've just done an optimisation of a mysql table which is located
> on a compressed zfs partition and spotted that the size reported
> by du is impossibly small for the file:-
>
> du -h detail*
> 1.5K detail.frm
> 7.5K detail.ibd
>
> ls -l detail*
> -rw-rw---- 1 mysql mysql 8660 Jun 13 10:00 detail.frm
> -rw-rw---- 1 mysql mysql 650117120 Jun 13 10:04 detail.ibd
>
> The table format for those interested is 3 int's, 3 indexes and
> contains 8million rows.
>
> I highly doubt that my 620MB table is taking up just 7.5K on disk
> any ideas?
Well-known "quirk"; welcome to ZFS. :-) The following article is long,
but if you grab a coffee and read it in full, it'll shed some light on
the ordeal:
http://www.cuddletech.com/blog/pivot/entry.php?id=983
There's also this:
http://blog.buttermountain.co.uk/2008/05/10/zfs-compression-when-du-and-ls-appear-to-disagree/
This is one of the many reasons I do not use ZFS compression. Not
spreading FUD, just saying stuff like this throws users for a loop, case
in point.
--
| Jeremy Chadwick jdc at parodius.com |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, US |
| Making life hard for others since 1977. PGP 4BD6C0CB |
More information about the freebsd-fs
mailing list