Since switching HTTPS termination to 64-bit, I've noticed a
significant CPU usage reduction on public-inbox.org. IMAPS,
NNTPS, and POP3S remain 32-bit for the moment since that doesn't
go through varnish and I haven't gotten around to dealing with
a 64-bit Xapian (or SQLite) install.
My current HTTPS setup is:
64-bit PublicInbox::PsgiRproxy -> varnish -> 32-bit PublicInbox::WWW
IMAPS, NNTPS, POP3S hit the same 32-bit public-inbox-netd
process directly without a caching layer.
C<LimitNOFILE=> in L<systemd.exec(5)>) may need to be raised to
accommodate many concurrent clients.
-Transport Layer Security (IMAPS, NNTPS, or via STARTTLS) significantly
-increases memory use of client sockets, be sure to account for that in
-capacity planning.
+Transport Layer Security (HTTPS, IMAPS, NNTPS, or via STARTTLS)
+significantly increases memory use of client sockets, be sure to account
+for that in capacity planning. Switching L<https://public-inbox.org/>
+to a 64-bit userspace reduced libcrypto.so (OpenSSL) CPU use by ~70%.
Bursts of small object allocations late in process life contribute to
fragmentation of the heap due to arenas (slabs) used internally by Perl.