diff options
author | Eric Wong <e@80x24.org> | 2018-08-20 20:56:52 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2018-08-20 21:09:42 +0000 |
commit | 0ed746e9b9f03a5067aa97cc4ed54b9e42443727 (patch) | |
tree | ea9d4ae65457ce57902208295e22d8d61bad0e88 /lib/unicorn/launcher.rb | |
parent | d03dd4e9e4ff29689752b7c82202008fefaf1210 (diff) | |
download | unicorn-0ed746e9b9f03a5067aa97cc4ed54b9e42443727.tar.gz |
We have never had any need for pipes with the default 64K capacity on Linux. Our pipes are only used for tiny writes in signal handlers and to perform parent shutdown detection. With the current /proc/sys/fs/pipe-user-pages-soft default, only 1024 pipes can be created by an unprivileged user before Linux clamps down the pipe size to 4K (a single page) for newly-created pipes[1]. So avoid penalizing OTHER pipe users who could benefit from the increased capacity and use only a single page for ourselves. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/pipe.c?h=v4.18#n642
Diffstat (limited to 'lib/unicorn/launcher.rb')
-rw-r--r-- | lib/unicorn/launcher.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/unicorn/launcher.rb b/lib/unicorn/launcher.rb index 5eafe5b..78e8f39 100644 --- a/lib/unicorn/launcher.rb +++ b/lib/unicorn/launcher.rb @@ -31,7 +31,7 @@ module Unicorn::Launcher # \_ parent - exits immediately ASAP # \_ unicorn master - writes to pipe when ready - rd, wr = IO.pipe + rd, wr = Unicorn.pipe grandparent = $$ if fork wr.close # grandparent does not write |