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
74770e41
Commit
74770e41
authored
Sep 23, 2014
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slaprunner: add configurable cpu-ratio parameter
parent
f94234c1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
3 deletions
+11
-3
software/slaprunner/common.cfg
software/slaprunner/common.cfg
+2
-2
software/slaprunner/instance-runner.cfg
software/slaprunner/instance-runner.cfg
+3
-0
software/slaprunner/schema.json
software/slaprunner/schema.json
+5
-0
software/slaprunner/template/supervisord.conf.in
software/slaprunner/template/supervisord.conf.in
+1
-1
No files found.
software/slaprunner/common.cfg
View file @
74770e41
...
...
@@ -43,7 +43,7 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-runner.cfg
output = ${buildout:directory}/template-runner.cfg.in
md5sum =
403074d7563ff122fa9a5b29ec4ba8a8
md5sum =
c2c25d668816ab3c32a79c33d05769fd
mode = 0644
[template-runner-import-script]
...
...
@@ -145,7 +145,7 @@ mode = 0644
[template-supervisord]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/template/${:filename}
md5sum =
af2d78440a358ec268d7ece4fce99ec9
md5sum =
239fe88e1522afe7686572dd34568720
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = supervisord.conf.in
download-only = true
...
...
software/slaprunner/instance-runner.cfg
View file @
74770e41
...
...
@@ -672,7 +672,10 @@ recipe = slapos.recipe.template:jinja2
template = ${template-supervisord:location}/${template-supervisord:filename}
rendered = $${directory:etc}/supervisord.conf
context =
import multiprocessing multiprocessing
import builtin __builtin__
section supervisord supervisord
key slapparameter_dict slap-configuration:configuration
key listener_slapgrid listener-slapgrid-bin:rendered
[listener-slapgrid-bin]
...
...
software/slaprunner/schema.json
View file @
74770e41
...
...
@@ -91,6 +91,11 @@
"minimum"
:
9683
,
"exclusiveMinimum"
:
true
,
},
"cpu-usage-ratio"
:
{
"description"
:
"Ratio of the CPU use for compilation, if value is set to n, compilation will use number-of-cpu/n of cpus (need instance restart)"
,
"type"
:
"integer"
,
"default"
:
4
},
"resilient-clone-number"
:
{
"title"
:
"Number of Resilient Clones"
,
"description"
:
"Number of clones to be deployed when a resilient runner, if missing a single clone is provided. Its value can be 1 or 2"
,
...
...
software/slaprunner/template/supervisord.conf.in
View file @
74770e41
...
...
@@ -26,7 +26,7 @@ autorestart = {{ supervisord['autorestart'] }}
stdout_logfile = {{ supervisord['no_logfile'] }}
stderr_logfile = {{ supervisord['no_logfile'] }}
directory = {{ supervisord['directory'] }}
environment = PATH="{{- supervisord['path'] -}}"
environment = PATH="{{- supervisord['path'] -}}"
,MAKEFLAGS="-j{{- '%d' % builtin.max(1, (multiprocessing.cpu_count() / builtin.int(slapparameter_dict.get('cpu-usage-ration', 4)))) -}}"
[program:{{- supervisord['slapgrid-cp'] -}}]
command = {{ supervisord['slapgrid-cp-command'] }}
...
...
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