Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
gstlal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Duncan Macleod
gstlal
Commits
fb420f40
Commit
fb420f40
authored
7 years ago
by
Duncan Meacher
Browse files
Options
Downloads
Patches
Plain Diff
gstlal_idq_trigger_gen: Added resource request
parent
35c10dc1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gstlal-ugly/bin/gstlal_idq_trigger_gen
+20
-0
20 additions, 0 deletions
gstlal-ugly/bin/gstlal_idq_trigger_gen
with
20 additions
and
0 deletions
gstlal-ugly/bin/gstlal_idq_trigger_gen
+
20
−
0
View file @
fb420f40
...
...
@@ -29,6 +29,7 @@ from optparse import OptionParser
from
collections
import
deque
import
os
import
sys
import
resource
import
StringIO
import
gi
...
...
@@ -47,6 +48,25 @@ from gstlal import pipeparts
from
gstlal
import
simplehandler
from
glue.ligolw
import
utils
as
ligolw_utils
#
# Make sure we have sufficient resources
# We allocate far more memory than we need, so this is okay
#
def
setrlimit
(
res
,
lim
):
hard_lim
=
resource
.
getrlimit
(
res
)[
1
]
resource
.
setrlimit
(
res
,
(
lim
if
lim
is
not
None
else
hard_lim
,
hard_lim
))
# set the number of processes and total set size up to hard limit and
# shrink the per-thread stack size (default is 10 MiB)
setrlimit
(
resource
.
RLIMIT_NPROC
,
None
)
setrlimit
(
resource
.
RLIMIT_AS
,
None
)
setrlimit
(
resource
.
RLIMIT_RSS
,
None
)
# FIXME: tests at CIT show that this next tweak has no effect. it's
# possible that SL7 has lowered the default stack size from SL6 and we
# don't need to do this anymore. remove?
setrlimit
(
resource
.
RLIMIT_STACK
,
1024
*
1024
)
# 1 MiB per thread
####################
#
# functions
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment