gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnu-arch-users] Managing smart fixed-size library


From: Mikhael Goikhman
Subject: [Gnu-arch-users] Managing smart fixed-size library
Date: Tue, 4 May 2004 20:54:18 GMT

I would like to hear your suggestions regarding the best algorithm to
keep the library size constant.

Please suppose there is a layer above tla that adds and removes revisions
and nothing else touches this library. Suppose also there are no
concurency problems of accessing this library.

To make the discussion less abstract, here, I execute the real command:

  du -s ~/archzoom-revlib/[jl]*/*/*/*/* | perl -ne 'printf "%3d %6d %s/%s",
    $., (split " ")[0], (split "/")[-5, -1]' | sort -k 3

The result is attached inline at the bottom of this message (I don't know
whether this list handles attachments, and sorry for the 3Kb length).

You may easily suppose more information is stored about every revision
when one is added or accessed.

Suppose we are at 100Mb over quota. The goal is to sort the revisions to
determine the list of revisions to remove. One of the simple (and not so
dumb as it may seem) policies is a random revision policy. i.e. choose a
random revision for removal until we satisfy our quota.

How would you implement such sorting function given these or other
revision fields: size, creation-time, last-access-time, number-of-all-
-revisions-in-its-version, index-within-all-revisions-in-its-version?

I.e., what is the mathematical way to say tla--devo--1.2--patch-113 is
more important than tla--devo--1.2--patch-25 and less important than,
say, address@hidden/linus--mainline--2.6--patch-6?

Regards,
Mikhael.



  1    208 address@hidden/gsys--main--0.1--patch-13
  2   1230 address@hidden/dists--jblack--1.1--patch-14
  3  15355 address@hidden/tla--newneon--1.3--patch-1
  4   2195 address@hidden/tlacontrib--devo--1.3--base-0
  5   3022 address@hidden/tlacontrib--devo--1.3--patch-12
  6   2559 address@hidden/tlacontrib--devo--1.3--patch-7
  7   2583 address@hidden/tlacontrib--devo--1.3--patch-8
  8 249703 address@hidden/linus--mainline--2.4--patch-27
  9 337575 address@hidden/linus--mainline--2.6--patch-6
 10     73 address@hidden/nntparch--head--0.1--base-0
 11     77 address@hidden/archive-metadata--alias--1--patch-2
 12  15061 address@hidden/moin--multiconf-modpy--1.3--patch-1
 13  19798 address@hidden/tla--win32--1.2--patch-5
 14    592 address@hidden/seven--main--0--patch-5
 15   1611 address@hidden/rb-site--mainline--0--patch-4
 16   1623 address@hidden/rb-site--mainline--0--patch-5
 17   1623 address@hidden/rb-site--mainline--0--patch-6
 18  15156 address@hidden/tla--devo--1.1--patch-1
 19     74 address@hidden/BigGoal--labnotes--1.0--base-0
 20   1313 address@hidden/dists--devo--1.0--patch-10
 21   2798 address@hidden/docs-hackerlab--devo--1.0--base-0
 22   1109 address@hidden/docs-package-framework--devo--1.0--base-0
 23   1391 address@hidden/docs-scm--devo--0.1--base-0
 24   2776 address@hidden/docs-tla--devo--1.0--base-0
 25   2844 address@hidden/docs-tla--devo--1.0--patch-1
 26   2872 address@hidden/docs-tla--devo--1.0--patch-3
 27   3520 address@hidden/docs-tla--devo--1.0--patch-4
 28   2829 address@hidden/docs-tla--devo--1.0--patch-5
 29   2774 address@hidden/file-utils--devo--1.0--base-0
 30  12236 address@hidden/hackerlab--devo--1.0--patch-1
 31  12516 address@hidden/hackerlab--devo--1.0--patch-13
 32  13056 address@hidden/hackerlab--devo--1.0--patch-39
 33   3472 address@hidden/scm--devo--0.1--base-0
 34   5300 address@hidden/scm--devo--0.1--patch-25
 35  21923 address@hidden/tla--devo--1.2--patch-111
 36  21938 address@hidden/tla--devo--1.2--patch-112
 37  21927 address@hidden/tla--devo--1.2--patch-113
 38  22067 address@hidden/tla--devo--1.2--patch-115
 39  18914 address@hidden/tla--devo--1.2--patch-12
 40  18918 address@hidden/tla--devo--1.2--patch-13
 41  19058 address@hidden/tla--devo--1.2--patch-18
 42  20246 address@hidden/tla--devo--1.2--patch-82
 43  22384 address@hidden/tla--devo--1.3--base-0
 44  33689 address@hidden/tla--devo--1.3--patch-1
 45  15713 address@hidden/tla--devo--1.3--patch-2
 46     61 address@hidden/web-master--devo--1.0--base-0
 47    193 address@hidden/web-master--devo--1.0--patch-9
 48    269 address@hidden/web-pages--quackerhead--1.0--base-0
 49    241 address@hidden/web-pages--srparish--1.0--base-0
 50    349 address@hidden/web-pages--srparish--1.0--patch-6
 51  86747 address@hidden/emacs--multi-tty--0--patch-156




reply via email to

[Prev in Thread] Current Thread [Next in Thread]