<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 15, 2016, at 4:40 AM, Dominik Hassler <<a href="mailto:hasslerd@gmx.li" class="">hasslerd@gmx.li</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi there,<br class=""><br class="">on my server at home (OmniOS r16, patched to the latest version) I added a brand new zpool (simple 2 HDD mirror).<br class=""><br class="">zpool list shows a fragmentation of 14% on my main pool. I did a recursive snapshot on a dataset on the main pool. transferred the dataset via replication stream to the new pool (zfs send -R mainpool/dataset@backup | zfs recv -F newpool/dataset).<br class=""><br class="">now zpool list shows a fragmentation of 27% on the *newpool* (no other data have ever been written to that pool).<br class=""><br class="">How can this be? Was my assumption wrong that send/recv acts like defrag on the receiving end?<br class=""></div></div></blockquote><div><br class=""></div><div>The pool’s fragmentation is a roll-up of the metaslab fragmentation. A metaslab’s fragmentation metric is a weighted</div><div>estimate of the number of small unallocated spaces in the metaslab. As such, a 100% free metaslab has no</div><div>fragmentation. Similarly, a metaslab with a lot of 512-byte spaces free has a higher fragmentation metric.</div><div><br class=""></div><div>To get a better idea of the layout, free space, and computed fragmentation metric, use “zdb -mm poolname”</div><div><br class=""></div><div>It is not clear how useful the metric is in practice, particularly when comparing pools of different size and </div><div>metaslab counts. IMHO, the zdb -mm output is much more useful than the aggregate metric.</div><div> — richard</div></div><br class=""><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class=""><span class="Apple-style-span" style="border-collapse: separate; line-height: normal; border-spacing: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class="">--</div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class=""><br class=""></div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class=""><a href="mailto:Richard.Elling@richardelling.com" class="">Richard.Elling@RichardElling.com</a><br class="">+1-760-896-4422<br class=""><br class=""><br class=""></div></span></div></span></div></span></div></span></div>
</div>
<br class=""></body></html>