Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ayush Tiwari
slapos
Commits
85b52784
Commit
85b52784
authored
Aug 19, 2011
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow to set zodb and zeo client cache sizes.
parent
8a31a2a3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
slapos/recipe/erp5/__init__.py
slapos/recipe/erp5/__init__.py
+9
-3
slapos/recipe/erp5/template/zope-zeo-snippet.conf.in
slapos/recipe/erp5/template/zope-zeo-snippet.conf.in
+2
-1
slapos/recipe/erp5/template/zope-zodb-snippet.conf.in
slapos/recipe/erp5/template/zope-zodb-snippet.conf.in
+1
-0
No files found.
slapos/recipe/erp5/__init__.py
View file @
85b52784
...
@@ -133,11 +133,15 @@ class Recipe(BaseSlapRecipe):
...
@@ -133,11 +133,15 @@ class Recipe(BaseSlapRecipe):
thread_amount_per_zope
=
int
(
self
.
options
.
get
(
thread_amount_per_zope
=
int
(
self
.
options
.
get
(
'single_zope_thread_amount'
,
4
))
'single_zope_thread_amount'
,
4
))
zodb_cache_size
=
int
(
self
.
options
.
get
(
'zodb_cache_size'
,
5000
))
return
self
.
installZope
(
ip
=
self
.
getLocalIPv4Address
(),
return
self
.
installZope
(
ip
=
self
.
getLocalIPv4Address
(),
port
=
12000
+
1
,
name
=
'zope_%s'
%
1
,
port
=
12000
+
1
,
name
=
'zope_%s'
%
1
,
zodb_configuration_string
=
self
.
substituteTemplate
(
zodb_configuration_string
=
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'zope-zodb-snippet.conf.in'
),
self
.
getTemplateFilename
(
'zope-zodb-snippet.conf.in'
),
dict
(
zodb_root_path
=
zodb_root_path
)),
with_timerservice
=
True
,
dict
(
zodb_root_path
=
zodb_root_path
,
zodb_cache_size
=
zodb_cache_size
)),
with_timerservice
=
True
,
thread_amount
=
thread_amount_per_zope
)
thread_amount
=
thread_amount_per_zope
)
def
installZopeCluster
(
self
):
def
installZopeCluster
(
self
):
...
@@ -161,7 +165,8 @@ class Recipe(BaseSlapRecipe):
...
@@ -161,7 +165,8 @@ class Recipe(BaseSlapRecipe):
# XXX How to define good values for this?
# XXX How to define good values for this?
mount_point
=
'/'
mount_point
=
'/'
cache_size
=
5000
zodb_cache_size
=
5000
zeo_client_cache_size
=
'20MB'
check_path
=
'/erp5/account_module'
check_path
=
'/erp5/account_module'
known_tid_storage_identifier_dict
=
{}
known_tid_storage_identifier_dict
=
{}
...
@@ -173,7 +178,8 @@ class Recipe(BaseSlapRecipe):
...
@@ -173,7 +178,8 @@ class Recipe(BaseSlapRecipe):
self
.
getTemplateFilename
(
'zope-zeo-snippet.conf.in'
),
dict
(
self
.
getTemplateFilename
(
'zope-zeo-snippet.conf.in'
),
dict
(
storage_name
=
storage_dict
[
'storage_name'
],
storage_name
=
storage_dict
[
'storage_name'
],
address
=
'%s:%s'
%
(
storage_dict
[
'ip'
],
storage_dict
[
'port'
]),
address
=
'%s:%s'
%
(
storage_dict
[
'ip'
],
storage_dict
[
'port'
]),
mount_point
=
mount_point
,
cache_size
=
cache_size
mount_point
=
mount_point
,
zodb_cache_size
=
zodb_cache_size
,
zeo_client_cache_size
=
zeo_client_cache_size
))
))
zope_port
=
12000
zope_port
=
12000
...
...
slapos/recipe/erp5/template/zope-zeo-snippet.conf.in
View file @
85b52784
<zodb_db %(storage_name)s>
<zodb_db %(storage_name)s>
cache-size %(
cache_size)s
cache-size %(
zodb_cache_size)d
mount-point %(mount_point)s
mount-point %(mount_point)s
<zeoclient>
<zeoclient>
cache-size %(zeo_client_cache_size)s
server %(address)s
server %(address)s
storage %(storage_name)s
storage %(storage_name)s
name %(storage_name)s
name %(storage_name)s
...
...
slapos/recipe/erp5/template/zope-zodb-snippet.conf.in
View file @
85b52784
<zodb_db root>
<zodb_db root>
%(zodb_cache_size)d
<filestorage>
<filestorage>
path %(zodb_root_path)s
path %(zodb_root_path)s
</filestorage>
</filestorage>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment