Gentoo Archives: gentoo-user

From: Michael Hampicke <gentoo-user@××××.biz>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Fast file system for cache directory with lot's of files
Date: Tue, 14 Aug 2012 17:52:55
Message-Id: 502A8EAC.7060700@hadt.biz
In Reply to: Re: [gentoo-user] Fast file system for cache directory with lot's of files by Daniel Troeder
1 Am 14.08.2012 10:21, schrieb Daniel Troeder:
2 > On 13.08.2012 16:53, Michael Hampicke wrote:
3 >> 2012/8/13 Daniel Troeder <daniel@×××××××××.com
4 >> 3rd thought: purging old files with "find"? your cache system should
5 >> have some kind of DB that holds that information.
6 >> 3: Well, it's a 3rd party application that - in theory - should take
7 >> care of removing old files. Sadly, it does not work as it's supposed to
8 >> be, While time passes the number of orphans grow :(
9 > There is also the possibility to write a really small daemon (less than
10 > 50 lines of C) that registers with inotify for the entire fs and
11 > journals the file activity to a sqlite-db.
12 >
13 > A simple sql-query from a cron/bash script will then give you all the
14 > files to delete with paths.
15 >
16 > It will probably be less work to write the daemon than to do 40
17 > fs-benchmarks - and the result will be the most efficient.
18 >
19
20 That is an interesting idea, but I have never used inotify on such a
21 huge file base, I am not sure what impact that has in terms of cpu
22 cycles being used. But I am going to try this on some snowy winter
23 weekend :)