From 9f8a166f4f874976f24ca58191141bb97271c17f Mon Sep 17 00:00:00 2001 From: Mario Alfredo Carrillo Arevalo Date: Fri, 5 May 2017 17:35:12 -0500 Subject: [PATCH] Set msize for 9p mounting By adding the msize value (524288 bytes) provides an enhancement in I/O storage operations. The following results are from I/O operations such as: read, write, random read etc...,using different block sizes, where the x results express how many times is better. Read | bs | random | linear | | ----- | ------ | ------- | | 64K | 6x | 7x | | 256K | 13x | 17x | | 512K | 16x | 13x | | 64MB | 14x | 14x | | 256MB | 15x | 15x | | 512MB | 14x | 15x | Write | bs | random | linear | | ----- | ------ | ------- | | 64K | 3x | 3x | | 256K | 3x | 3x | | 512K | 3x | 3x | | 64MB | 3x | 3x | | 256MB | 3x | 3x | | 512MB | 3x | 3x | Signed-off-by: Mario Alfredo Carrillo Arevalo --- src/init.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/init.c b/src/init.c index ceb4b4b3..8d4fed87 100644 --- a/src/init.c +++ b/src/init.c @@ -464,8 +464,12 @@ static int hyper_setup_shared(struct hyper_pod *pod) return -1; } + // Adding 524288 (512K) value to msize, provides + // an enhancement in I/O storage operations. + // This value was tested using different block sizes + // and I/O operations. if (mount(pod->share_tag, SHARED_DIR, "9p", - MS_MGC_VAL| MS_NODEV, "trans=virtio") < 0) { + MS_MGC_VAL| MS_NODEV, "trans=virtio,msize=524288") < 0) { perror("fail to mount shared dir"); return -1;