unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Thiago Jung Bauermann via Bug reports for GNU Guix <bug-guix@gnu.org>
To: 51787@debbugs.gnu.org
Cc: Ricardo Wurmus <rekado@elephly.net>,
	Mathieu Othacehe <othacehe@gnu.org>,
	Bengt Richter <bokr@bokr.com>, Leo Famulari <leo@famulari.name>
Subject: bug#51787: Disk performance on ci.guix.gnu.org
Date: Tue, 21 Dec 2021 21:27:46 -0300	[thread overview]
Message-ID: <87lf0dzalt.fsf@kolabnow.com> (raw)
In-Reply-To: <87v8zhn9m1.fsf@elephly.net>


Hello,

Ricardo Wurmus <rekado@elephly.net> writes:

> Today we discovered a few more things and discussed them on IRC.  Here’s
> a summary.
>
> /var/cache sits on the same storage as /gnu.  We mounted the 5TB ext4
> file system that’s hosted by the SAN at /mnt_test and started copying
> over /var/cache to /mnt_test/var/cache.  Transfer speed was considerably
> faster (not *great*, but reasonably fast) than the copy of
> /gnu/store/trash to the same target.
>
> This confirmed our suspicions that the problem is not with the storage
> array but due to the fact that /gnu/store/trash (and also /gnu/store)
> is an extremely large, flat directory.  /var/cache is not.

There was an interesting thread in the Linux kernel mailing lists about this
very issue earlier this year:

https://lore.kernel.org/linux-fsdevel/206078.1621264018@warthog.procyon.org.uk/

I’m not sure I completely understood all of the concerns discussed there, but
my understanding of it is that for workloads which don’t concurrently modify
the huge directory, it’s size isn’t a problem for btrfs and XFS and in fact
it’s even more efficient to have one big directory rather than
subdirectories¹. It’s should also be well handled even by ext4, IIUC².

The problem for all filesystems is concurrently modifying the directory
(e.g., adding or removing files), because the kernel serializes directory
operations at the VFS layer.

Also in that case XFS can also have allocation issues when adding new files
if one isn’t careful.³

-- 
Thanks
Thiago

¹ https://lore.kernel.org/linux-fsdevel/20210517232237.GE2893@dread.disaster.area/
² https://lore.kernel.org/linux-fsdevel/6E4DE257-4220-4B5B-B3D0-B67C7BC69BB5@dilger.ca/
³ https://lore.kernel.org/linux-fsdevel/20210519125743.GP2893@dread.disaster.area/




  parent reply	other threads:[~2021-12-22  1:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <875yrjpi1y.fsf@elephly.net>
2021-12-20 16:59 ` bug#51787: Disk performance on ci.guix.gnu.org Mathieu Othacehe
2021-12-20 17:05   ` Ricardo Wurmus
2021-12-20 21:53     ` Mathieu Othacehe
2021-12-21 17:26       ` Ricardo Wurmus
2021-12-21 17:51         ` Leo Famulari
2021-12-21 18:23         ` Mathieu Othacehe
2021-12-21 23:20         ` Bengt Richter
2021-12-22  0:27         ` Thiago Jung Bauermann via Bug reports for GNU Guix [this message]
2021-12-25 22:19         ` Ricardo Wurmus
2021-12-26  8:53           ` Mathieu Othacehe
2021-12-30 10:44             ` Ricardo Wurmus
2021-12-20 18:36   ` Bengt Richter

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lf0dzalt.fsf@kolabnow.com \
    --to=bug-guix@gnu.org \
    --cc=51787@debbugs.gnu.org \
    --cc=bauermann@kolabnow.com \
    --cc=bokr@bokr.com \
    --cc=leo@famulari.name \
    --cc=othacehe@gnu.org \
    --cc=rekado@elephly.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).