diff options
author | Ashish Pandey <aspandey@redhat.com> | 2017-09-18 14:07:31 +0530 |
---|---|---|
committer | Jeff Darcy <jeff@pl.atyp.us> | 2017-11-10 22:15:37 +0000 |
commit | a87abbd42e8b02deabbdfe290b16ed0d2f2e4c45 (patch) | |
tree | ac36ba79b6e7a104cc49a9413a330d8499aee647 /xlators/mgmt | |
parent | 83558c69736878d2554ba77af3a6e27574da9447 (diff) |
cluster/ec: Keep last written strip in in-memory cache
Problem:
Consider an EC volume with configuration 4 + 2.
The stripe size for this would be 512 * 4 = 2048.
That means, 2048 bytes of user data stored in one
stripe. Let's say 2048 + 512 = 2560 bytes are
already written on this volume. 512 Bytes would
be in second stripe. Now, if there are sequential
writes with offset 2560 and of size 1 Byte, we have
to read the whole stripe, encode it with 1 Byte and
then again have to write it back. Next, write with
offset 2561 and size of 1 Byte will again
READ-MODIFY-WRITE the whole stripe. This is causing
bad performance because of lots of READ request
travelling over the network.
There are some tools and scenario's where such kind
of load is coming and users are not aware of that.
Example: fio and zip
Solution:
One possible solution to deal with this issue is to
keep last stripe in memory. This way, we need not to
read it again and we can save READ fop going over the
network. Considering the above example, we have to
keep last 2048 bytes (maximum) in memory per file.
Change-Id: I3f95e6fc3ff81953646d374c445a40c6886b0b85
BUG: 1471753
Signed-off-by: Ashish Pandey <aspandey@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volume-set.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c index 94f3882c434..69987a01a1c 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c @@ -3503,6 +3503,12 @@ struct volopt_map_entry glusterd_volopt_map[] = { .op_version = GD_OP_VERSION_3_10_1, .flags = VOLOPT_FLAG_CLIENT_OPT }, + { .key = "disperse.stripe-cache", + .voltype = "cluster/disperse", + .type = NO_DOC, + .op_version = GD_OP_VERSION_3_13_0, + .flags = OPT_FLAG_CLIENT_OPT + }, /* Halo replication options */ { .key = "cluster.halo-enabled", |