From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id CB3E31381F4 for ; Mon, 13 Aug 2012 15:57:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EEFF8E07F7; Mon, 13 Aug 2012 15:56:54 +0000 (UTC) Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com [209.85.214.53]) by pigeon.gentoo.org (Postfix) with ESMTP id 2B166E07E2 for ; Mon, 13 Aug 2012 15:52:42 +0000 (UTC) Received: by bkwj4 with SMTP id j4so1720658bkw.40 for ; Mon, 13 Aug 2012 08:52:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=uwZh9e/FM+55pAyii/+t2ror/xCF4I9ED/7DoSNrdcM=; b=tmn6To8V4+JtB52dcw+47SyZdRO7QuTUMWBEwnLs5Sre/Bg4CsykLIozPoZlwbGuJc l0T4Y0MGh1iFLRdkdOl+pzuM6c7b3/MLLTt+Eua7IQvOf0JICY3LZYIUZ9MEkRfKA1MY NtSDW/K0kFNxnCqjanzb+5mnrVDdKDsJu0z1nDOMV5W2LnmH+vhjLBORnii2YArDymqh DNtsR2iVk6NWQxi1/FvAPzgqfzEyGQ8Kiuw+jW4xY96BbKKDVQJ9k5XYSmh47O+CT9S8 qbhLflOmUhPZjT/uzwFvfpCXEF+0fHOIW/76ZADsLReA0SLRmYh6V5AW+LIvhognqj6o 71NA== Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.204.156.73 with SMTP id v9mr4423949bkw.116.1344873162227; Mon, 13 Aug 2012 08:52:42 -0700 (PDT) Received: by 10.205.25.8 with HTTP; Mon, 13 Aug 2012 08:52:42 -0700 (PDT) In-Reply-To: <50291CAE.9040204@gmail.com> References: <5028FF82.7020908@nileshgr.com> <50291CAE.9040204@gmail.com> Date: Mon, 13 Aug 2012 11:52:42 -0400 Message-ID: Subject: Re: [gentoo-user] Fast file system for cache directory with lot's of files From: Michael Mol To: gentoo-user@lists.gentoo.org Content-Type: multipart/alternative; boundary=000e0ce038cc1a44c304c727af35 X-Archives-Salt: 2ae0ce60-cd7e-4c8f-a081-ff9830e0306c X-Archives-Hash: 8b1a7bf4b81b2252be6876d41798a4ff --000e0ce038cc1a44c304c727af35 Content-Type: text/plain; charset=UTF-8 On Mon, Aug 13, 2012 at 11:26 AM, Michael Hampicke wrote: > Am 13.08.2012 16:52, schrieb Michael Mol: > > On Mon, Aug 13, 2012 at 10:42 AM, Michael Hampicke < > mgehampicke@gmail.com>wrote: > > > >> Have you indexed your ext4 partition? > >>> > >>> # tune2fs -O dir_index /dev/your_partition > >>> # e2fsck -D /dev/your_partition > >>> > >> Hi, the dir_index is active. I guess that's why delete operations take > as > >> long as they take (index has to be updated every time) > >> > > > > 1) Scan for files to remove > > 2) disable index > > 3) Remove files > > 4) enable index > > > > ? > > > > That's what I love about gentoo-users :) , I would never have thought of > that myself. I will try this and see how much of an performance gain > there is. Disabling the index should only require a 'mount -o remount' I > guess. > > It's the same logic as behind database programming; do a bulk modification, then update the index afterwards. The index update will take longer than that for a single file, but it has the potential to be more efficient in bulk operations. (It'd be nice if ext4 supported transactional behaviors, where you could defer index updates until after a commit, but I don't think it (or any filesystem on Linux) does.) You *should* be able to enable/disable indexes on a per-directory basis, so if your search pattern is confined, I'd go that route. -- :wq --000e0ce038cc1a44c304c727af35 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Mon, Aug 13, 2012 at 11:26 AM, Michael Hampic= ke <mgehampicke@gmail.com> wrote:
Am 13.08.2012 16:52, schrieb Michael Mol:
> On Mon, Aug 13, 2012 at 10:42 AM, Michael Hampi= cke <mgehampicke@gmail.com&= gt;wrote:
>
>> Have you indexed your ext4 partition?
>>>
>>> # tune2fs -O dir_index /dev/your_partition
>>> # e2fsck -D /dev/your_partition
>>>
>> Hi, the dir_index is active. I guess that's why delete operati= ons take as
>> long as they take (index has to be updated every time)
>>
>
> 1) Scan for files to remove
> 2) disable index
> 3) Remove files
> 4) enable index
>
> ?
>

That's what I love about gentoo-users :) , I would never ha= ve thought of
that myself. I will try this and see how much of an performance gain
there is. Disabling the index should only require a 'mount -o remount&#= 39; I
guess.


It's the same logic as behind data= base programming; do a bulk modification, then update the index afterwards.= The index update will take longer than that for a single file, but it has = the potential to be more efficient in bulk operations. (It'd be nice if= ext4 supported transactional behaviors, where you could defer index update= s until after a commit, but I don't think it (or any filesystem on Linu= x) does.)

You *should* be able to enable/disable indexes on a per= -directory basis, so if your search pattern is confined, I'd go that ro= ute.



--
:wq
--000e0ce038cc1a44c304c727af35--