summaryrefslogtreecommitdiffstats
path: root/gluster/swift/common/Glusterfs.py
diff options
context:
space:
mode:
authorLuis Pabon <lpabon@redhat.com>2013-07-26 15:56:26 -0400
committerLuis Pabon <lpabon@redhat.com>2013-08-06 11:23:46 -0700
commit9e6fbbcee91105ea8e5fa67a86b4b5d3054e32aa (patch)
tree84b26b4c4494b14c2334467121ba8be7af3cd5ed /gluster/swift/common/Glusterfs.py
parent027951c1022739a8d53379048349ac2391763d6b (diff)
perf: Container and account performance inc
* Container and accounts performance increase by removing the need to update either the object count or the container count, respectively. New hidden configuratoins added to re-enable the functionality. * object_only configuratoin removed from fs.conf and replaced with a hidden configuration. The new hidden configuration reports gratuituosly crated directories as objects, to support a compatibility behavior with previous version 1.4.8 (even though it was incorrect). BUG 988969: https://bugzilla.redhat.com/show_bug.cgi?id=988969 Change-Id: Idca20b8629ec38606ff5692fe62bc2cadabffc86 Signed-off-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/5403 Reviewed-by: Peter Portante <pportant@redhat.com> Tested-by: Peter Portante <pportant@redhat.com> Reviewed-on: http://review.gluster.org/5504
Diffstat (limited to 'gluster/swift/common/Glusterfs.py')
-rw-r--r--gluster/swift/common/Glusterfs.py44
1 files changed, 37 insertions, 7 deletions
diff --git a/gluster/swift/common/Glusterfs.py b/gluster/swift/common/Glusterfs.py
index 01cfcc0..9ff54ba 100644
--- a/gluster/swift/common/Glusterfs.py
+++ b/gluster/swift/common/Glusterfs.py
@@ -31,11 +31,13 @@ from gluster.swift.common.exceptions import GlusterfsException, \
#
_fs_conf = ConfigParser()
MOUNT_IP = 'localhost'
-OBJECT_ONLY = True
RUN_DIR = '/var/run/swift'
SWIFT_DIR = '/etc/swift'
_do_getsize = False
_allow_mount_per_server = False
+_implicit_dir_objects = False
+_container_update_object_count = False
+_account_update_container_count = False
if _fs_conf.read(os.path.join(SWIFT_DIR, 'fs.conf')):
try:
@@ -43,12 +45,6 @@ if _fs_conf.read(os.path.join(SWIFT_DIR, 'fs.conf')):
except (NoSectionError, NoOptionError):
pass
try:
- OBJECT_ONLY = _fs_conf.get('DEFAULT',
- 'object_only',
- "yes") in TRUE_VALUES
- except (NoSectionError, NoOptionError):
- pass
- try:
RUN_DIR = _fs_conf.get('DEFAULT', 'run_dir', RUN_DIR)
except (NoSectionError, NoOptionError):
pass
@@ -68,6 +64,40 @@ if _fs_conf.read(os.path.join(SWIFT_DIR, 'fs.conf')):
except (NoSectionError, NoOptionError):
pass
+ # -- Hidden configuration option --
+ # Report gratuitously created directories as objects
+ # Directories can be gratuitously created on the path to a given
+ # object. This option turn on or off the reporting of those directories.
+ # It defaults to False so that only those directories explicitly
+ # created by the object server PUT REST API are reported
+ try:
+ _implicit_dir_objects = \
+ _fs_conf.get('DEFAULT',
+ 'implicit_dir_objects',
+ "no") in TRUE_VALUES
+ except (NoSectionError, NoOptionError):
+ pass
+
+ # -- Hidden configuration option --
+ # Due to the impact on performance, this option is disabled by default
+ try:
+ _container_update_object_count = \
+ _fs_conf.get('DEFAULT',
+ 'container_update_object_count',
+ "no") in TRUE_VALUES
+ except (NoSectionError, NoOptionError):
+ pass
+
+ # -- Hidden configuration option --
+ # Due to the impact on performance, this option is disabled by default
+ try:
+ _account_update_container_count = \
+ _fs_conf.get('DEFAULT',
+ 'account_update_container_count',
+ "no") in TRUE_VALUES
+ except (NoSectionError, NoOptionError):
+ pass
+
NAME = 'glusterfs'