about summary refs log tree commit homepage
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/public-inbox-httpd@.service1
-rw-r--r--examples/public-inbox-imapd@.service2
-rw-r--r--examples/public-inbox-netd@.service8
-rw-r--r--examples/public-inbox-nntpd@.service2
4 files changed, 11 insertions, 2 deletions
diff --git a/examples/public-inbox-httpd@.service b/examples/public-inbox-httpd@.service
index 11859198..ca68fc7e 100644
--- a/examples/public-inbox-httpd@.service
+++ b/examples/public-inbox-httpd@.service
@@ -19,6 +19,7 @@ After = public-inbox-httpd.socket
 Environment = PI_CONFIG=/home/pi/.public-inbox/config \
 PATH=/usr/local/bin:/usr/bin:/bin \
 TZ=UTC \
+MALLOC_MMAP_THRESHOLD_=131072 \
 PERL_INLINE_DIRECTORY=/tmp/.pub-inline
 
 LimitNOFILE = 30000
diff --git a/examples/public-inbox-imapd@.service b/examples/public-inbox-imapd@.service
index 80104605..1aede65d 100644
--- a/examples/public-inbox-imapd@.service
+++ b/examples/public-inbox-imapd@.service
@@ -16,6 +16,8 @@ After = public-inbox-imapd.socket
 [Service]
 Environment = PI_CONFIG=/home/pi/.public-inbox/config \
 PATH=/usr/local/bin:/usr/bin:/bin \
+TZ=UTC \
+MALLOC_MMAP_THRESHOLD_=131072 \
 PERL_INLINE_DIRECTORY=/tmp/.pub-inline
 
 LimitNOFILE = 30000
diff --git a/examples/public-inbox-netd@.service b/examples/public-inbox-netd@.service
index 83d2e995..51f58fbb 100644
--- a/examples/public-inbox-netd@.service
+++ b/examples/public-inbox-netd@.service
@@ -12,11 +12,15 @@ Wants = public-inbox-netd.socket
 After = public-inbox-netd.socket
 
 [Service]
-# An LD_PRELOAD for libjemalloc can be added here.  It currently seems
-# more resistant to fragmentation in long-lived daemons than glibc.
+
+# Setting MALLOC_MMAP_THRESHOLD_=131072 reduces fragmentation by
+# disabling the sliding mmap window in glibc malloc.  An LD_PRELOAD for
+# libjemalloc may be added here, instead.  jemalloc is more resistant to
+# fragmentation in long-lived daemons than unconfigured glibc malloc.
 Environment = PI_CONFIG=/home/pi/.public-inbox/config \
 PATH=/usr/local/bin:/usr/bin:/bin \
 TZ=UTC \
+MALLOC_MMAP_THRESHOLD_=131072 \
 PERL_INLINE_DIRECTORY=/tmp/.netd-inline
 
 LimitNOFILE = 30000
diff --git a/examples/public-inbox-nntpd@.service b/examples/public-inbox-nntpd@.service
index 24f9ca73..556cb76f 100644
--- a/examples/public-inbox-nntpd@.service
+++ b/examples/public-inbox-nntpd@.service
@@ -16,6 +16,8 @@ After = public-inbox-nntpd.socket
 [Service]
 Environment = PI_CONFIG=/home/pi/.public-inbox/config \
 PATH=/usr/local/bin:/usr/bin:/bin \
+TZ=UTC \
+MALLOC_MMAP_THRESHOLD_=131072 \
 PERL_INLINE_DIRECTORY=/tmp/.pub-inline
 
 LimitNOFILE = 30000