Commit e702eb74 authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

Make pithos backend pool size configurable

Refs: #3561
parent 1aa0bd54
...@@ -44,6 +44,7 @@ PITHOS_BACKEND_QUEUE_EXCHANGE pithos ...@@ -44,6 +44,7 @@ PITHOS_BACKEND_QUEUE_EXCHANGE pithos
PITHOS_BACKEND_QUOTA 50 GB (50 * 1024 ** 3) Default user quota PITHOS_BACKEND_QUOTA 50 GB (50 * 1024 ** 3) Default user quota
PITHOS_BACKEND_VERSIONING auto Default versioning policy for containers PITHOS_BACKEND_VERSIONING auto Default versioning policy for containers
PITHOS_BACKEND_FREE_VERSIONING True Default versioning debit policy (default free) PITHOS_BACKEND_FREE_VERSIONING True Default versioning debit policy (default free)
PITHOS_BACKEND_POOL_SIZE 5 Default backend pool size
PITHOS_UPDATE_MD5 True Update object checksums when using hashmaps PITHOS_UPDATE_MD5 True Update object checksums when using hashmaps
PITHOS_SERVICE_TOKEN '' Service token acquired by the identity provider (astakos) PITHOS_SERVICE_TOKEN '' Service token acquired by the identity provider (astakos)
PITHOS_RADOS_STORAGE False Enables or disables secondary Pithos storage on RADOS PITHOS_RADOS_STORAGE False Enables or disables secondary Pithos storage on RADOS
......
...@@ -63,3 +63,5 @@ ...@@ -63,3 +63,5 @@
# Higher values mean more safety and longer URLs # Higher values mean more safety and longer URLs
# #
#PITHOS_PUBLIC_URL_SECURITY = 16 #PITHOS_PUBLIC_URL_SECURITY = 16
#
#PITHOS_BACKEND_POOL_SIZE = 5
...@@ -32,6 +32,9 @@ BACKEND_QUOTA = getattr( ...@@ -32,6 +32,9 @@ BACKEND_QUOTA = getattr(
BACKEND_VERSIONING = getattr(settings, 'PITHOS_BACKEND_VERSIONING', 'auto') BACKEND_VERSIONING = getattr(settings, 'PITHOS_BACKEND_VERSIONING', 'auto')
BACKEND_FREE_VERSIONING = getattr(settings, 'PITHOS_BACKEND_FREE_VERSIONING', True) BACKEND_FREE_VERSIONING = getattr(settings, 'PITHOS_BACKEND_FREE_VERSIONING', True)
# Default backend pool size
BACKEND_POOL_SIZE = getattr(settings, 'PITHOS_BACKEND_POOL_SIZE', 5)
# Update object checksums when using hashmaps. # Update object checksums when using hashmaps.
UPDATE_MD5 = getattr(settings, 'PITHOS_UPDATE_MD5', True) UPDATE_MD5 = getattr(settings, 'PITHOS_UPDATE_MD5', True)
......
...@@ -63,7 +63,7 @@ from pithos.api.settings import (BACKEND_DB_MODULE, BACKEND_DB_CONNECTION, ...@@ -63,7 +63,7 @@ from pithos.api.settings import (BACKEND_DB_MODULE, BACKEND_DB_CONNECTION,
QUOTAHOLDER_URL, QUOTAHOLDER_TOKEN, QUOTAHOLDER_URL, QUOTAHOLDER_TOKEN,
QUOTAHOLDER_POOLSIZE, QUOTAHOLDER_POOLSIZE,
BACKEND_QUOTA, BACKEND_VERSIONING, BACKEND_QUOTA, BACKEND_VERSIONING,
BACKEND_FREE_VERSIONING, BACKEND_FREE_VERSIONING, BACKEND_POOL_SIZE,
AUTHENTICATION_URL, AUTHENTICATION_USERS, AUTHENTICATION_URL, AUTHENTICATION_USERS,
COOKIE_NAME, USER_CATALOG_URL, COOKIE_NAME, USER_CATALOG_URL,
RADOS_STORAGE, RADOS_POOL_BLOCKS, RADOS_STORAGE, RADOS_POOL_BLOCKS,
...@@ -958,7 +958,7 @@ def simple_list_response(request, l): ...@@ -958,7 +958,7 @@ def simple_list_response(request, l):
from pithos.backends.util import PithosBackendPool from pithos.backends.util import PithosBackendPool
POOL_SIZE = 5
if RADOS_STORAGE: if RADOS_STORAGE:
BLOCK_PARAMS = { 'mappool': RADOS_POOL_MAPS, BLOCK_PARAMS = { 'mappool': RADOS_POOL_MAPS,
'blockpool': RADOS_POOL_BLOCKS, 'blockpool': RADOS_POOL_BLOCKS,
...@@ -970,7 +970,7 @@ else: ...@@ -970,7 +970,7 @@ else:
_pithos_backend_pool = PithosBackendPool( _pithos_backend_pool = PithosBackendPool(
size=POOL_SIZE, size=BACKEND_POOL_SIZE,
db_module=BACKEND_DB_MODULE, db_module=BACKEND_DB_MODULE,
db_connection=BACKEND_DB_CONNECTION, db_connection=BACKEND_DB_CONNECTION,
block_module=BACKEND_BLOCK_MODULE, block_module=BACKEND_BLOCK_MODULE,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment