diff options
| author | Amar Tumballi <amar@gluster.com> | 2010-03-25 01:44:17 +0000 | 
|---|---|---|
| committer | Anand V. Avati <avati@dev.gluster.com> | 2010-03-25 05:49:19 -0700 | 
| commit | 4cb614047e4c9180d2960d06675f46d7504bb1e0 (patch) | |
| tree | edeb299ec30895569ae618bb83e1c0205e51d92f | |
| parent | da47fe9a400dbc811327d4fb8e754c47dbdeaccc (diff) | |
changed the order of write-behind - read-ahead in volgen.v3.0.4rc2
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
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
| -rw-r--r-- | extras/volgen/CreateVolfile.py | 33 | 
1 files 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")  | 
