All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Monakhov <dmonakhov@openvz.org>
To: Li Xi <pkuelelixi@gmail.com>,
	linux-fsdevel@vger.kernel.org,
	Ext4 Developers List <linux-ext4@vger.kernel.org>,
	viro@ZenIV.linux.org.uk, hch@infradead.org,
	Jan Kara <jack@suse.cz>
Subject: Re: [PATCH v2 0/4] quota: add project quota support
Date: Tue, 12 Aug 2014 19:35:58 +0400	[thread overview]
Message-ID: <87oavpsotd.fsf@openvz.org> (raw)
In-Reply-To: <CAPTn0cAKi64Fh1pAVTDLvSS5-1Kjv7KN2HpGxtm4J8-ym-4nOQ@mail.gmail.com>

On Sat, 9 Aug 2014 00:39:58 +0800, Li Xi <pkuelelixi@gmail.com> wrote:
> Hi all,
> 
> The following patches propose an implementation of project support
> for ext4. A project is an aggregate of unrelated inodes which might
> scatter in different directories. Inodes belongs to a project
> possesses a same identification i.e. 'project ID', just like every
> inode has its user/group indentification. The following patches adds
> project quota as supplement to the former uer/group quota types.
> 
> This project ID of an inode is iherited from its parent direcotry
> and saved as an internal field of ext4 inode.
> 
> This is not the first existed attepmtion to add project quta support
> for ext4. Patches of subtree quota support which was posted by Dmity
> Monakhov in 2012 (http://lwn.net/Articles/506064/) implemented the
> similar feature in a different way. Rather than saving the project
> (or subtree) ID as an internal inode field, those patches manages
> the ID as extented attributes.
> 
> We rebased both patch sets onto the same kernel version and run
> benchmakrs respectively to comparing the peformance difference.
> It is worth noting that patches from Lai Siyao and Niu Yawei
> (quota: remove-dqptr_sem,
> http://article.gmane.org/gmane.comp.file-systems.ext4/44341/)
> improve the performance of quota enforcement significantly, which
> can be seen clearly from following results.
> 
> It is obvious that extended attribute implementation has performance
> impact when creating files. That is why we choose to push the patches
> which use internal inode field to save project ID.
I'll bet a box of "russian caviar" that AlViro will never ever allow 
to place project ID to generic inode. Because it is obviously has no
reason for any other filesystem except xfs/ext4.

BTW. Which quota options you use for performance testing? It looks like
you use non-journaled quota. But this means that you have to fully
recalculate quota in case of power failure. It is reasonable to enable
journaled-quota, but it result in visible journaling overhead.
> 
> Kernel: 3.16.0-rc5
> Server: Dell R620 (2 x E5-2667@3.3GHz, 256GB memory)
> Storage: 10 x 15K SAS disks(RAID10)
> Test tool: mdtest-1.9.3. Mdtest created 800K files in total. Each
> thread created files in unique directory.
> 
> File Creation:
>                      1thr     2thr     4thr     8thr    16thr
> - vanilla
> quota disabled      66094   105781   178968   186647   172536
> quotaon(ug)         60337    99582   157396   171463   162872
> 
> - vanilla + remove-dqptr_sem patches
> quota disabled      65955   112082   185550   181511   171988
> quotaon(ug)         62391   101905   171013   190570   168914
> 
> - prjquota(xattr)
> quota disabled      61396    97580   147852   146423   164895
> quotaon(ug)         57009    93435   140589   135748   153196
> quotaon(ugP)        57500    89419   133604   125291   105127
> 
> - prjquota(xattr) + remove-dqptr_sem patches
> quota disabled      64053   100078   147608   139403   163960
> quotaon(ug)         60754   104726   149231   139053   165990
> quotaon(ugP)        59238    93606   148921   138434   163931
> 
> - prjquota(internal) + remove-dqptr_sem patches
> quota disabled      65826   111828   181486   189227   171241
> quotaon(ug)         65418   107745   173584   180562   173752
> quotaon(ugP)        64669   103890   169176   186426   172192
> 
> 
> File Removal:
>                      1thr     2thr     4thr     8thr    16thr
> - vanilla
> quota disabled     118059   169825   234661   291812   345656
> quotaon(ug)        106675   135834   153532   100437    87489
> 
> - vanilla + remove-dqptr_sem patches
> quota disabled     120374   168437   236818   291754   331141
> quotaon(ug)        110709   161954   238333   293700   329015
> 
> - prjquota(xattr)
> quota disabled     116680   161662   229190   295642   332959
> quotaon(ug)        104783   134359   154950   100516    87923
> quotaon(ugP)       100240   125978   108653    68286    58991
> 
> - prjquota(xattr) + remove-dqptr_sem patches
> quota disabled     116281   168938   233733   286663   344002
> quotaon(ug)        109775   164995   236001   299389   340683
> quotaon(ugP)       113935   162979   236112   300033   356117
> 
> - prjquota(internal) + remove-dqptr_sem patches
> quota disabled     119537   171565   247418   291068   350138
> quotaon(ug)        121756   159580   240778   298012   342437
> quotaon(ugP)       118954   168022   241206   289055   334008
> 
> Changelog:
> * v2 <- v1:
>   - Add ioctl interface for setting/getting project;
>   - Add EXT4_FEATURE_RO_COMPAT_PROJECT;
>   - Add get_projid() method in struct dquot_operations;
>   - Add error check of ext4_inode_projid_set/get().
> 
> v1: http://article.gmane.org/gmane.comp.file-systems.ext4/45153
> 
> Any comments or feedbacks are appreciated.
> 
> Regards,
>                                           - Li Xi
> 
> Li Xi(4):
>  quota: Adds general codes to enforces project quota limites
>  ext4: Adds project ID support for ext4
>  ext4: Adds project quota support for ext4
>  ext4: Adds ioctl interface support for ext4 project
> 
>  Documentation/filesystems/ext4.txt |    4 +
>  fs/ext4/Kconfig                    |   11 --
>  fs/ext4/Makefile                   |    1 -
>  fs/ext4/ext4.h                     |   19 +++-
>  fs/ext4/ialloc.c                   |   16 +--
>  fs/ext4/inode.c                    |   85 +++++++++++++-
>  fs/ext4/ioctl.c                    |  100 ++++++++++++++++
>  fs/ext4/project.c                  |  224 ------------------------------------
>  fs/ext4/project.h                  |   58 ---------
>  fs/ext4/super.c                    |   45 ++++++--
>  fs/ext4/xattr.c                    |    6 -
>  fs/ext4/xattr.h                    |    2 -
>  fs/quota/Kconfig                   |    9 ++
>  fs/quota/dquot.c                   |  120 ++++++++++++++-----
>  fs/quota/quota.c                   |    5 +-
>  fs/quota/quotaio_v2.h              |    4 +-
>  include/linux/fs.h                 |    1 -
>  include/linux/quota.h              |    8 ++
>  include/uapi/linux/xattr.h         |    2 -
>  19 files changed, 345 insertions(+), 375 deletions(-)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-08-12 15:35 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08 16:39 [PATCH v2 0/4] quota: add project quota support Li Xi
2014-08-08 22:33 ` Theodore Ts'o
2014-08-09 14:24   ` Li Xi
2014-08-09 17:24     ` Theodore Ts'o
2014-08-09 22:17       ` Theodore Ts'o
2014-08-09 23:38         ` Dave Chinner
2014-08-10  0:09           ` Theodore Ts'o
2014-08-10 22:18             ` Dave Chinner
2014-08-10  2:15         ` Li Xi
2014-08-11 10:49           ` Jan Kara
2014-08-10  8:38         ` Shuichi Ihara
2014-08-10 16:52           ` Theodore Ts'o
2014-08-10 20:47       ` James Bottomley
2014-08-10 21:49         ` Theodore Ts'o
2014-08-09 22:14   ` Dave Chinner
2014-08-11 14:41 ` Theodore Ts'o
2014-08-12 15:35 ` Dmitry Monakhov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-08-08 16:58 Li Xi
2014-08-10  0:38 Li Xi
2014-08-11  0:06 Li Xi
2014-08-11  0:19 Li Xi
2014-08-11 10:23 Li Xi
2014-08-11 13:48 ` Theodore Ts'o
2014-08-11 14:16 Li Xi
2014-08-11 14:40 Li Xi
2014-08-11 14:45 ` Theodore Ts'o
2014-08-11 14:49   ` Li Xi
2014-08-11 15:03 Li Xi
2014-08-13  2:32 Li Xi
2014-08-13 13:22 ` Theodore Ts'o
2014-08-14  1:34 Li Xi

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=87oavpsotd.fsf@openvz.org \
    --to=dmonakhov@openvz.org \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=pkuelelixi@gmail.com \
    --cc=viro@ZenIV.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.