lustre-devel-lustre.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@whamcloud.com>
To: Nathan Rutman <nrutman@gmail.com>
Cc: "lustre-devel@lists.lustre.org" <lustre-devel@lists.lustre.org>
Subject: Re: [lustre-devel] modern precreate
Date: Sat, 9 Jan 2021 15:56:35 +0000	[thread overview]
Message-ID: <1576C588-0DD1-4955-BE45-D8E6763076D7@whamcloud.com> (raw)
In-Reply-To: <CAA4iDz6+c4Qthf+aEYZf+7gugX_1mqoSucaB1RTrE2DkU6P1VQ@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2817 bytes --]

On Jan 8, 2021, at 12:44, Nathan Rutman <nrutman@gmail.com<mailto:nrutman@gmail.com>> wrote:


Riffing on something Andreas said in a lustre-discuss thread, I'm hoping someone can correct my understanding of how precreate works currently.

Olden days:

MDS would ask each OST for a set of precreated objects via a MDT->OST RPC. These have to be cleaned up during recovery, hence a cap. These were used up as MDS assigned them to layouts, and so MDS has to go back and get more, even for 0-length files.

Modern days, Lustre 2.5+:

MDT doesn't hold a pool of OST objects but instead takes an OST fid range from a FLD server instead. Each MD object has a mapping with an eventual OST object by this fid. The OST side just holds a small number of anonymous objects and assigns the fid to an object when any operation is executed without an existing FID->inode mapping on the OST.There is no more precreate RPC necessary, since OSTs maintain their own pool of anonymous objects and only use them up when data is actually written, and can create more when running low. There is no recovery cleanup needed on the OSTs.
In this case, there should be no performance difference between create and mknod except for the FLD operation, and the number of OSTs should not matter for create rates.

Is my understanding wrong? It clearly must be, since Andreas is still talking OST_CREATE rpc and recovery implications, and we do see a performance difference with mknod and creating files with layouts.

The precreate code still works the same as "the land before the time of FIDs".  Actual objects are still precreated/destroyed on the OSTs. The only difference is that the FID sequences allocated to MDTs allow the OSTs to have different pools of objects for each MDT so that they don't contend/conflict when those MDTs assign the objects to their own inodes.

Having multiple MDTs does "scale" the OST object space, in that there can be more object subdirectories (one per sequence), which improves both the concurrency and the maximum number of objects.  There has also been work done to increase the maximum number of files per directory in ldiskfs, but that doesn't really improve performance.

The patch https://review.whamcloud.com/38424 "LU-11912<https://jira.whamcloud.com/browse/LU-11912> ofd: reduce LUSTRE_DATA_SEQ_MAX_WIDTH" would create smaller object directory trees, and allow "aging" of old objects to be in separate object directory trees from new objects.  That allows old objects to drop out of cache (avoiding one-create-per-leaf as the size of the directory grows very lareg), and keeps fewer "hot" objects densely packed in memory (allowing many new entries to be packed into a single leaf block).

Cheers, Andreas
--
Andreas Dilger
Principal Lustre Architect
Whamcloud







[-- Attachment #1.2: Type: text/html, Size: 7271 bytes --]

[-- Attachment #2: Type: text/plain, Size: 165 bytes --]

_______________________________________________
lustre-devel mailing list
lustre-devel@lists.lustre.org
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org

      reply	other threads:[~2021-01-09 15:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-08 19:44 [lustre-devel] modern precreate Nathan Rutman
2021-01-09 15:56 ` Andreas Dilger [this message]

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=1576C588-0DD1-4955-BE45-D8E6763076D7@whamcloud.com \
    --to=adilger@whamcloud.com \
    --cc=lustre-devel@lists.lustre.org \
    --cc=nrutman@gmail.com \
    /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 NNTP newsgroup(s).