<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> Chavdar Ivanov [mailto:ci4@outlook.com] <br><b>Sent:</b> 13 November 2013 16:15<br><b>To:</b> 'Peter Tribble'; 'Tobias Oetiker'<br><b>Cc:</b> omnios-discuss@lists.omniti.com<br><b>Subject:</b> RE: [OmniOS-discuss] zfs and small files<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> OmniOS-discuss [<a href="mailto:omnios-discuss-bounces@lists.omniti.com">mailto:omnios-discuss-bounces@lists.omniti.com</a>] <b>On Behalf Of </b>Peter Tribble<br><b>Sent:</b> 13 November 2013 15:36<br><b>To:</b> Tobias Oetiker<br><b>Cc:</b> <a href="mailto:omnios-discuss@lists.omniti.com">omnios-discuss@lists.omniti.com</a><br><b>Subject:</b> Re: [OmniOS-discuss] zfs and small files<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><div><p class=MsoNormal>On Wed, Nov 13, 2013 at 2:46 PM, Tobias Oetiker <<a href="mailto:tobi@oetiker.ch" target="_blank">tobi@oetiker.ch</a>> wrote:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'><p class=MsoNormal>Hi Peter,<br><br>Today Peter Tribble wrote:<br><br>> On Wed, Nov 13, 2013 at 1:59 PM, Tobias Oetiker <<a href="mailto:tobi@oetiker.ch">tobi@oetiker.ch</a>> wrote:<br>><br>> > We have this customer who loves to put tons of files into single<br>> > directories.  The other day he found that removing a directory with<br>> > 7k files from raidz2 pool (with ssd log device) took about 10<br>> > minutes ...<br>> ><br>> > is this to be expected, or should this be faster on a properly<br>> > configured system ?<br>> ><br>><br>> That's a tiny number of files. Ought to be essentially instant.<br>> I routinely have up to a million files in a directory. That can take<br>> a few minutes to delete, but I don't have any SSDs at all on<br>> those systems.<br>><br>> This isn't being done over NFS, is it? That can dramatically slow<br>> operations like this, even with a log.<br><br>nope it is local ...<br><br>are you running this on raidz2 ?<o:p></o:p></p></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Yes. On old X4540s. Deletion of a directory with 7k files in it<o:p></o:p></p></div><div><p class=MsoNormal>takes about 0.3s<o:p></o:p></p><p class=MsoNormal><b><i><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>[ci] <o:p></o:p></span></i></b></p><p class=MsoNormal><b><i><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>It will take about 0.3s IIF you have snapshots of the ZFS. It will take looooong time if this is the only snapshot of the system. <o:p></o:p></span></i></b></p><p class=MsoNormal><b><i><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></i></b></p><p class=MsoNormal><b><i><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Chavdar<o:p></o:p></span></i></b></p><p class=MsoNormal><b><i><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>[ci] <o:p></o:p></span></i></b></p><p class=MsoNormal><b><i><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>(my usual “method” of deleting many files on a system without a snapshot is to create one, delete them as required, then remove the snapshot at a convenient time – at the end of the day or so… <o:p></o:p></span></i></b></p><p class=MsoNormal><b><i><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>CI<o:p></o:p></span></i></b></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p></div><div><p class=MsoNormal> <o:p></o:p></p></div></div><p class=MsoNormal>-- <br>-Peter Tribble<br><a href="http://www.petertribble.co.uk/">http://www.petertribble.co.uk/</a> - <a href="http://ptribble.blogspot.com/">http://ptribble.blogspot.com/</a> <o:p></o:p></p></div></div></div></div></div></body></html>