File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change
1
+ * Setup jemalloc in the default Dockerfile for memory optimization.
2
+
3
+ * Matt Almeida* , * Jean Boussier*
4
+
1
5
* Commented out lines in .railsrc file should not be treated as arguments when using
2
6
rails new generator command. Update ARGVScrubber to ignore text after # symbols.
3
7
Original file line number Diff line number Diff line change @@ -595,6 +595,9 @@ def dockerfile_deploy_packages
595
595
# ActiveStorage preview support
596
596
packages << "libvips" unless skip_active_storage?
597
597
598
+ # jemalloc for memory optimization
599
+ packages << "libjemalloc2"
600
+
598
601
packages . compact . sort
599
602
end
600
603
Original file line number Diff line number Diff line change 1
1
#! /bin/bash -e
2
2
3
+ # Enable jemalloc for reduced memory usage and reduce latency.
4
+ if [ -f /usr/lib/* /libjemalloc.so.2 ]; then
5
+ LD_PRELOAD=" $( echo /usr/lib/* /libjemalloc.so.2) $LD_PRELOAD "
6
+ fi
7
+
3
8
< % unless skip_active_record? -%>
4
9
# If running the rails server then create or migrate existing database
5
10
if [ " ${1} " == " ./bin/rails" ] && [ " ${2} " == " server" ]; then
You can’t perform that action at this time.
0 commit comments