diff options
author | Raghavendra G <rgowdapp@redhat.com> | 2013-09-16 17:46:50 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-11-26 10:24:02 -0800 |
commit | ab3ab1978a4768e9eed8e23b47e72b25046e607a (patch) | |
tree | f4e8d1a5aecd24d45a9db531d658a947cd94261d /rpc | |
parent | 460ce40d3e2069bf6262dccea6f5ae2fac60d90f (diff) |
features/quota: Improvements to quota
* Two stages of quota enforcement is done:
Soft and hard quota Upon reaching soft quota limit on the directory
it logs/alerts in the quota daemon log (ie DEFAULT_LOG_DIR/quotad.log)
and no more writes allowed after hard
quota limit. After reaching the soft-limit the daemon alerts the
user/admin repeatively for every 'alert-time', which is
configurable.
* Quota enforcer is moved to server-side.
It takes care of enforcing quota. Since enforcer doesn't have the
cluster view, it relies on another service called
quota-aggregator. Aggregator, on query can return the size of a
directory based on the cluster view.
Enforcer is always loaded in the server graph and is by passed if
the feature is not enabled.
Options specific to enforcer:
server-quota - Specifies whether the feature is on/off. It is used
to by pass the quota if turned off.
deem-statfs - If set to on, it takes quota limits into consideration
while estimating fs size. (df command). The algorithm followed is,
i. Adjust statvfs based on limit configured on root.
ii. If limit is set on the inode passed, use size/limits on that inode to
populate statvfs. Otherwise, use size/limits configured on root.
iii. Upon statvfs, update the ctx->size on the inode.
iv. Don't let DHT aggregate, instead take the maximum of the usages from the
subvols of the DHT, since each of it contains the complete information.
Enforcer also makes use of gfid-to-path conversion functionality to
work correctly when a client like nfs predominently relies on
nameless lookups.
* Quota Aggregator acts as a thin client to provide cluster view
Its a lightweight *gluster client* process with no mount point,
started upon enabling quota or restarting the volume. This is a
single process run on each brick, which can answer queries on all
volumes in the cluster. Its volfile stored in
GLUSTERD_DEFAULT_WORKING_DIR/quotad/quotad.vol.
Credits:
Raghavendra Bhat <rabhat@redhat.com>
Varun Shastry <vshastry@redhat.com>
Shishir Gowda <sgowda@redhat.com>
Kruthika Dhananjay <kdhananj@redhat.com>
Brian Foster <bfoster@redhat.com>
Krishnan Parthasarathi <kparthas@redhat.com>
Change-Id: Id1cb25b414951da34c665a55f77385d482e0f9de
BUG: 969461
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-on: http://review.gluster.org/5952
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'rpc')
-rw-r--r-- | rpc/rpc-lib/src/protocol-common.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/protocol-common.h b/rpc/rpc-lib/src/protocol-common.h index 4bca0f55822..d64f280cf91 100644 --- a/rpc/rpc-lib/src/protocol-common.h +++ b/rpc/rpc-lib/src/protocol-common.h @@ -82,6 +82,13 @@ enum gf_pmap_procnum { GF_PMAP_MAXVALUE, }; +enum gf_aggregator_procnum { + GF_AGGREGATOR_NULL = 0, + GF_AGGREGATOR_LOOKUP, + GF_AGGREGATOR_GETLIMIT, + GF_AGGREGATOR_MAXVALUE, +}; + enum gf_pmap_port_type { GF_PMAP_PORT_FREE = 0, GF_PMAP_PORT_FOREIGN, @@ -227,6 +234,10 @@ typedef enum { #define GLUSTER_FOP_VERSION 330 /* 3.3.0 */ #define GLUSTER_FOP_PROCCNT GFS3_OP_MAXVALUE +/* Aggregator */ +#define GLUSTER_AGGREGATOR_PROGRAM 29852134 /* Completely random */ +#define GLUSTER_AGGREGATOR_VERSION 1 + /* Second version */ #define GD_MGMT_PROGRAM 1238433 /* Completely random */ #define GD_MGMT_VERSION 2 /* 0.0.2 */ |