summaryrefslogtreecommitdiffstats
path: root/ufo/etc
diff options
context:
space:
mode:
authorMohammed Junaid <junaid@redhat.com>2013-04-07 06:05:56 +0530
committerAnand Avati <avati@redhat.com>2013-04-12 13:48:43 -0700
commitbbaa273468f8e5377027aedcabcaa076dd7fec7e (patch)
tree89447270516e604cd61d58a2ac9229716086cd6d /ufo/etc
parentf34343d3751cd73e8eabe6d5544fb1f58b316595 (diff)
object-storage: turn off stat() for container list
Turn of stat() system calls used to fetch the file size during a container listing operation since these system calls can swamp Gluster and the result is most often not used. When a GET or HEAD request is made on a container, stat() system calls are made during the Python standard library method, os.walk, to determine if a given directory entry is another directory to recurse into, and then utils._update_list() will stat() each file to get it size, and finally utils.get_container_details_from_fs() will stat() each directory encountered. For most installations we have seen so far, we don't need the container listing to accurately return the size of all the objects in the container, so we can reduce the number of stat() system calls by not fetching the size of the object. For now, turn it off by default, and provide an /etc/swift/fs.conf configuration parameter to turn it back on: accurate_size_in_listing = yes The default for the above is "no". Change-Id: I7dde11e14bb32ecafa3eabb08852f1ffc4366b35 BUG: 903396 Signed-off-by: Mohammed Junaid <junaid@redhat.com> Reviewed-on: http://review.gluster.org/4787 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'ufo/etc')
-rw-r--r--ufo/etc/fs.conf-gluster8
1 files changed, 8 insertions, 0 deletions
diff --git a/ufo/etc/fs.conf-gluster b/ufo/etc/fs.conf-gluster
index 54822a43..71a9b031 100644
--- a/ufo/etc/fs.conf-gluster
+++ b/ufo/etc/fs.conf-gluster
@@ -7,3 +7,11 @@ mount_ip = localhost
# methods besides UFO (not object only), which disables a caching
# optimizations in order to keep in sync with file system changes.
object_only = no
+
+# Performance optimization parameter. When turned off, the filesystem will
+# see a reduced number of stat calls, resulting in substantially faster
+# response time for GET and HEAD container requests on containers with large
+# numbers of objects, at the expense of an accurate count of combined bytes
+# used by all objects in the container. For most installations "off" works
+# fine.
+accurate_size_in_listing = off \ No newline at end of file