From 4cb614047e4c9180d2960d06675f46d7504bb1e0 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Thu, 25 Mar 2010 01:44:17 +0000 Subject: changed the order of write-behind - read-ahead in volgen. Signed-off-by: Amar Tumballi Signed-off-by: Anand V. Avati BUG: 740 (read-ahead does not work to its full potential when loaded on top of write-behind) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=740 --- extras/volgen/CreateVolfile.py | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/extras/volgen/CreateVolfile.py b/extras/volgen/CreateVolfile.py index 208b7f72bf8..36c2ab9e078 100644 --- a/extras/volgen/CreateVolfile.py +++ b/extras/volgen/CreateVolfile.py @@ -164,28 +164,16 @@ class CreateVolfile: mount_fd.write (" subvolumes %s\n" % subvolumes[0]) mount_fd.write ("end-volume\n\n") - - mount_fd.write ("volume writebehind\n") - mount_fd.write (" type performance/write-behind\n") - mount_fd.write (" option cache-size 4MB\n") - if self.unused: - mount_fd.write ("# option enable-trickling-writes yes # Flush final write calls when network is free\n") - mount_fd.write ("# option enable-O_SYNC yes # Enable O_SYNC for write-behind\n") - mount_fd.write ("# option disable-for-first-nbytes 1 # Disable first nbytes with very small initial writes\n") - if self.volume_size_client: - mount_fd.write (" subvolumes quota\n") - else: - mount_fd.write (" subvolumes %s\n" % subvolumes[0]) - - mount_fd.write ("end-volume\n\n") - mount_fd.write ("volume readahead\n") mount_fd.write (" type performance/read-ahead\n") mount_fd.write (" option page-count 4\n") if self.unused: mount_fd.write ("# option force-atime-update yes # force updating atimes, default off\n") - mount_fd.write (" subvolumes writebehind\n") + if self.volume_size_client: + mount_fd.write (" subvolumes quota\n") + else: + mount_fd.write (" subvolumes %s\n" % subvolumes[0]) mount_fd.write ("end-volume\n\n") mount_fd.write ("volume iocache\n") @@ -204,9 +192,20 @@ class CreateVolfile: mount_fd.write (" subvolumes iocache\n") mount_fd.write ("end-volume\n\n") + mount_fd.write ("volume writebehind\n") + mount_fd.write (" type performance/write-behind\n") + mount_fd.write (" option cache-size 4MB\n") + if self.unused: + mount_fd.write ("# option enable-trickling-writes yes # Flush final write calls when network is free\n") + mount_fd.write ("# option enable-O_SYNC yes # Enable O_SYNC for write-behind\n") + mount_fd.write ("# option disable-for-first-nbytes 1 # Disable first nbytes with very small initial writes\n") + + mount_fd.write (" subvolumes quickread\n") + mount_fd.write ("end-volume\n\n") + mount_fd.write ("volume statprefetch\n") mount_fd.write (" type performance/stat-prefetch\n") - mount_fd.write (" subvolumes quickread\n") + mount_fd.write (" subvolumes writebehind\n") mount_fd.write ("end-volume\n\n") -- cgit