mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 08:02:15 +03:00
Lower stack chunk size in RTS to reduce thread STACK memory (closes #5190)
This reduces memory consumption for new idle subscriptions significantly (see linked ticket). The hypothesis is: we fork a lot of threads per websocket, and some of these use slightly more than the initial 1K stack size, so the first overflow balloons to 32K, when significantly less is required. However: running with `+RTS -K1K -xc` did not seem to show evidence of any overflows! So it's a mystery why this improves things. GHC should probably also be doubling the stack buffer at each overflow or doing something even smarter; the knobs we have aren't so helpful.
This commit is contained in:
parent
f6d111ccd9
commit
f9b5b8382c
@ -20,6 +20,7 @@
|
||||
|
||||
(Add entries here in the order of: server, console, cli, docs, others)
|
||||
|
||||
- server: improve memory usage of idle websockets connections (#5190)
|
||||
- server: few relay fixes (fix #5020, #5037, #5046) (#5013)
|
||||
- server: raise error on startup when `--unauthorized-role` is ignored (#4736)
|
||||
- server: fix bug which arises when renaming/dropping a column on a remote relationship (#5005, #5119)
|
||||
|
@ -48,7 +48,11 @@ common common-exe
|
||||
-- limiting the parallel GC to 2 or 3 capabilities as a very conservative choice, since more
|
||||
-- than that is highly unlikely to ever be helpful. More benchmarking would be useful to know if
|
||||
-- this is the right decision. It’s possible it would better to just turn it off completely.
|
||||
"-with-rtsopts=-N -I2 -qn2"
|
||||
--
|
||||
-- `-kc8K` helps limit memory consumption in websockets (perhaps elsewhere) by making the
|
||||
-- cost of a thread's first (and probably only) stack overflow less severe.
|
||||
-- See:https://github.com/hasura/graphql-engine/issues/5190
|
||||
"-with-rtsopts=-N -I2 -qn2 -kc8K"
|
||||
|
||||
library
|
||||
import: common-all
|
||||
|
Loading…
Reference in New Issue
Block a user