From: Mikko Rantalainen <mikko.rantalainen@peda.net>
To: util-linux@vger.kernel.org
Subject: RFE: hardlink: support specifying max_size too?
Date: Tue, 23 Apr 2024 16:58:10 +0300 [thread overview]
Message-ID: <0aa615c2-8e17-4eb3-9a25-c8af39b35d81@peda.net> (raw)
I have huge directory hierarchies that I would like to run hardlink
against but comparing a lot of files against each other results in high
RAM usage because so much of the file metadata is kept in memory.
Could you add max_size (--maximum-size) option in addition to min_size
(--minimum-size)? This would allow splitting the work into small
fragments where hardlink only needs to process files in given range and
immediately ignore all other files. Or it could be used to run full
linking in multiple parallel tasks with sensible RAM requirements if you
can run hardlink without size limitations (e.g. one task for 1–1MB
files, another for 1MB–10MB and third task for files bigger than 10MB).
It might also make sense to reorder the test for filesize and regex
processing in inserter() because testing for size is probably faster
because the stat() has already been made. Currently the stats.files is
also increased for files that get ignored by size filter which may not
be intentional.
I think I could provide patches if I just know which Git repo I should
use as the basis. Is https://github.com/util-linux/util-linux the
correct one?
--
Mikko
next reply other threads:[~2024-04-23 14:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-23 13:58 Mikko Rantalainen [this message]
2024-04-24 9:37 ` RFE: hardlink: support specifying max_size too? Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0aa615c2-8e17-4eb3-9a25-c8af39b35d81@peda.net \
--to=mikko.rantalainen@peda.net \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).