Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Timo Ley
synapse
Commits
c7446906
Unverified
Commit
c7446906
authored
2 years ago
by
realtyem
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Set LD_PRELOAD to load jemalloc in Dockerfile-workers. (#14182)
parent
c3e4edb4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changelog.d/14182.docker
+1
-0
1 addition, 0 deletions
changelog.d/14182.docker
docker/configure_workers_and_start.py
+11
-1
11 additions, 1 deletion
docker/configure_workers_and_start.py
with
12 additions
and
1 deletion
changelog.d/14182.docker
0 → 100644
+
1
−
0
View file @
c7446906
Set LD_PRELOAD to use jemalloc memory allocator in Dockerfile-workers.
This diff is collapsed.
Click to expand it.
docker/configure_workers_and_start.py
+
11
−
1
View file @
c7446906
...
...
@@ -39,6 +39,7 @@
# continue to work if so.
import
os
import
platform
import
subprocess
import
sys
from
pathlib
import
Path
...
...
@@ -632,14 +633,23 @@ def main(args: List[str], environ: MutableMapping[str, str]) -> None:
with
open
(
mark_filepath
,
"
w
"
)
as
f
:
f
.
write
(
""
)
# Lifted right out of start.py
jemallocpath
=
"
/usr/lib/%s-linux-gnu/libjemalloc.so.2
"
%
(
platform
.
machine
(),)
if
os
.
path
.
isfile
(
jemallocpath
):
environ
[
"
LD_PRELOAD
"
]
=
jemallocpath
else
:
log
(
"
Could not find %s, will not use
"
%
(
jemallocpath
,))
# Start supervisord, which will start Synapse, all of the configured worker
# processes, redis, nginx etc. according to the config we created above.
log
(
"
Starting supervisord
"
)
os
.
execl
(
os
.
execl
e
(
"
/usr/local/bin/supervisord
"
,
"
supervisord
"
,
"
-c
"
,
"
/etc/supervisor/supervisord.conf
"
,
environ
,
)
...
...
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