3 ms·
SBCL needs a relatively large amount of memory to start with, but beyond that it doesn't require much. I run a few small services written in Common Lisp. Instea
by jorams 3y ago
SBCL needs a relatively large amount of memory to start with, but beyond that it doesn't require much. I run a few small services written in Common Lisp. Instead of running a separate process for every one of them I run a single SBCL process and run each service in a different thread.
This has some downsides: Firstly they run in the same address space, so global state is shared and serious bugs can affect another service. Secondly they run as a single systemd service, so they're not easy to manage individually. Still I've found it to work quite nicely for things that are simple and don't really need attention.
- schemescape 3y agoThanks! That setup is actually my backup plan if I start to run out of memory. Maybe it’s my imagination but it seems like CL isn’t as suited to sharing code and read-only data pages across processes (e.g. in shared libraries). Or maybe there’s a solution I just haven’t found yet…