[was: Subject: [PATCH 0/6] daemon: reduce fragmentation via preload

Eric Wong <[email protected]> wrote:
> For long-lived daemons, perform immortal allocations as early as
> possible to reduce the likelyhood of heap fragmentation due to
> mixed-lifetime allocations happening once the process is fully
> loaded and serving requests, since per-request allocations
> should all be short-lived.

Encode also loads lazily...

I thought about having public-inbox-{index,mda,watch} track a
list of modules for WWW to preload, but that can't predict the
future.

There's no telling what emails will show up in the future which
trigger autoloading, so I think the only way to avoid
fragmentation is to preload everything which would get
autoloaded... Ugh, that even means Encode::EBCDIC and
Encode::Symbol (for dingbats!)

> On a side note, I'm wondering if WWW should just preload by
> default.  I'm not sure if anybody uses public-inbox.cgi (or
> should be using it :P).  It's not like we don't ship
> public-inbox-httpd; and any PSGI implementation could be used
> for smaller inboxes (or powerful-enough hardware).

Yeah, likely to happen.  Trying to optimize a CGI script for
startup time while depending on git, SQLite, and Xapian just
doesn't seem worth it.
--
unsubscribe: one-click, see List-Unsubscribe header
archive: https://public-inbox.org/meta/

Reply via email to