Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 06 Nov 2011 15:36:31 -0800
From:      Doug Barton <dougb@FreeBSD.org>
To:        Alexander Best <arundel@freebsd.org>
Cc:        "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org>, Ivan Voras <ivoras@freebsd.org>
Subject:   Re: Default inode number too low in FFS nowadays?
Message-ID:  <4EB719FF.1070403@FreeBSD.org>
In-Reply-To: <20111106222752.GA88092@freebsd.org>
References:  <B888842A-7DB4-491B-93E3-A376745019F5@sarenet.es> <j8u2af$chv$1@dough.gmane.org> <5C156A63-D86D-4C1B-AFC4-DC5EA09494F6@xerq.net> <4EB3C63F.2060805@quip.cz> <20111104141626.GA28925@freebsd.org> <4EB7126C.3030809@FreeBSD.org> <20111106222752.GA88092@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11/06/2011 14:27, Alexander Best wrote:
> On Sun Nov  6 11, Doug Barton wrote:
>> On 11/04/2011 07:16, Alexander Best wrote:
>>> On Fri Nov  4 11, Miroslav Lachman wrote:
>>>> Matt Connor wrote:
>>>>>
>>>>> On Nov 3, 2011, at 5:43 AM, Ivan Voras<ivoras@freebsd.org>  wrote:
>>>>>
>>>>>> On 02/11/2011 12:57, Borja Marcos wrote:
>>>>
>>>> [...]
>>>>
>>>>>> Did you forget to do "make clean" after "make install" on several large
>>>>>> ports?
>>>>>>
>>>>>> But yes, the ports tree is getting a bit unwieldy. On the other hand,
>>>>>> did you fsck the file system lately?
>>>>>>
>>>>>
>>>>> cd /usr/ports/ports-mgmt/portupgrade&&  make install clean
>>>>>
>>>>> portsclean -CD
>>>>>
>>>>> That's a quick way to clean out all the clutter.
>>>>
>>>> Installing ruby and portupgrade is really big overhead to simple task, 
>>>> which can be done by:
>>>>
>>>> cd /usr/ports && make clean
>>>>
>>>> or with find:
>>>>
>>>> find /usr/ports/ -depth 3 -name "work" -exec rm -r {} +
>>>
>>> ...or with 'rm -rf /usr/ports/*/*/work'
>>
>> This comes up periodically, and for some reason no one pays attention to
>> all the work that's been done in the past to verify that the fastest
>> method is:
>>
>> find /usr/ports -maxdepth 3 -type d -name -work -exec rm -rf {} \;
> 
> 1) -work ?

Typo, obviously.

> 2) i like -depth 3 better, because it will not touch my /usr/ports/work
>    directory, where i keep my latest ports stuff (theoretically).

You're probably right, but that variant hasn't been tested. Although
it's likely to be only slightly faster, the more important bit is -type
d, which avoids testing files since there are many more of those than
there are directories. The use of either -maxdepth or -depth to avoid
recursing into the work directories themselves will be the thing that
saves you the most time.

> 3) are you sure \; is "faster" than + ?

The last time this came up the xargs version was tested (which +
basically emulates) and it was either not faster, or slower. If you
think about how the disk access is likely to work, the reason this is
true should be obvious.

Rather than theorizing about it further, why don't you do some actual
testing. :)


Doug

-- 

		"We could put the whole Internet into a book."
		"Too practical."

	Breadth of IT experience, and depth of knowledge in the DNS.
	Yours for the right price.  :)  http://SupersetSolutions.com/




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4EB719FF.1070403>