<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=""><div class="">Well .. it seems I missed the most important part of the FAQ, thank for pointing it. As you stated, playing with xfs_bmap shows that the 13TB file is fragmented a lot, xfs_fsr is now working on it.</div><div class=""><br class=""></div><div class="">Any hints about sector size ? Regarding the workload, my point would be that use 4k could not hurts here.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""></div><div class="">Cédric</div><div class=""><br class=""></div><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><span style="background-color: rgb(255, 255, 255);" class="">-- </span><br class=""><div style="font-weight: bold; font-size: 13px; font-family: Arial; color: rgb(0, 63, 128); margin-top: 10px;" class=""><div class="">Cédric Lemarchand</div><div style="font-weight: normal; color: rgb(126, 124, 131);" class="">IT Infrastructure Manager</div><div style="margin-top: 12px;" class="">iXBlue</div><div style="font-weight: normal; font-size: 10px; color: rgb(126, 124, 131);" class="">34 rue de la Croix de Fer</div><div style="font-weight: normal; font-size: 10px; color: rgb(126, 124, 131);" class="">78100 St Germain en Laye<br class="">France</div><div style="font-weight: normal; font-size: 12px; margin: 12px 0px;" class="">Tel. +33 1 30 08 88 88<br class="">Mob. +33 6 37 23 40 93<br class="">Fax +33 1 30 08 88 00</div><div style="margin-bottom: 20px;" class=""><a href="http://www.ixblue.com" style="font-weight: normal; font-size: 12px; color: rgb(0, 63, 128);" class="">www.ixblue.com</a></div></div></div></div></div></div>
</div>
<br class=""><div style=""><blockquote type="cite" class=""><div class="">On 14 Oct 2015, at 00:04, Eric Sandeen <<a href="mailto:sandeen@sandeen.net" class="">sandeen@sandeen.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class=""><br class="">On 10/13/15 4:54 PM, Cédric Lemarchand wrote:<br class=""><blockquote type="cite" class="">I think I actually have very bad fragmentation values, which<br class="">unfortunately involve performances drop by an order of magnitude of<br class="">3x/4x. A defrag is actually running, but it's really really slow, to the<br class="">point that I will need to constantly defrag the partition, which is not<br class="">optimal. There are approximatively 500Go written sequentially every day,<br class="">and almost 10/12T random writes every week due to backup files rotations.<br class=""></blockquote><br class="">Does anything besides the xfs_db "frag" command make you think that<br class="">fragmentation is a problem?  See below...<br class=""><br class=""><blockquote type="cite" class="">The partition has been formated with default options, over LVM (one<br class="">VG/one LV).<br class=""><br class="">Here are somes questions :<br class=""><br class="">- is there mkfs.xfs or mounting options that could reduce the<br class="">fragmentation over the time ?<br class="">- the backup software writes use blocks size of ~4MB, as the previous<br class="">question, any options to optimize differents layers (LVM & XFS) ? The<br class="">underlaying FS could handle 1MB block size, should I set this value for<br class="">XFS too ? do I need to play with "su" and "sw" as stated in the FAQ ?<br class=""><br class="">I admit that there are so many options that I am a bit lost.<br class=""><br class="">Thanks,<br class=""><br class="">Cédric<br class=""><br class="">--<br class="">Some informations : VM running Debian Jessie, underlaying storage is<br class="">software raid (ZFS).<br class=""><br class=""><br class="">df -k<br class="">Filesystem            1K-blocks        Used   Available Use% Mounted on<br class="">/dev/mapper/VG2-LV1 53685000192 40921853928 12763146264  77% /vrepo1<br class=""><br class="">xfs_db -r /dev/VG2/LV1 -c frag<br class="">actual 4222, ideal 137, fragmentation factor 96.76%<br class=""></blockquote><br class=""><a href="http://xfs.org/index.php/XFS_FAQ#Q:_The_xfs_db_.22frag.22_command_says_I.27m_over_50.25._Is_that_bad.3F" class="">http://xfs.org/index.php/XFS_FAQ#Q:_The_xfs_db_.22frag.22_command_says_I.27m_over_50.25._Is_that_bad.3F</a><br class=""><br class="">So in 137 files, you have 4222 extents, or an average of<br class="">about 30 extents per file.<br class=""><br class="">Or put another way, you have 39026 gigabytes used, in<br class="">4222 extents, for an average of 9 gigabytes per extent.<br class=""><br class="">Those don't sound like problematic numbers.<br class=""><br class="">xfs_bmap on an individual file will show you its mapping.<br class="">But for files of several hundred gigs, having several<br class="">very large extents really is not a problem.<br class=""><br class="">I think the xfs_db frag command may be misleading you about<br class="">where the problem lies.<br class=""><br class="">Of course it's possible that all but one of your files is<br class="">well laid out, and that last file is horribly, horribly<br class="">fragmented.  But the top-level numbers don't tell us whether<br class="">that might be the case.<br class=""><br class="">-Eric<br class=""><br class="">_______________________________________________<br class="">xfs mailing list<br class="">xfs@oss.sgi.com<br class="">http://oss.sgi.com/mailman/listinfo/xfs<br class=""></div></div></blockquote></div><br class=""></body></html>