Commit Graph
2861 Commits
Author SHA1 Message Date
Wez Furlong a1fb96dfc0 add (low|no)_memory_reduction_policy options
These provide more control over the memory vs spool IO tradeoff
when memory is short.
2025-02-21 10:48:14 -07:00
Wez Furlong 0ab266f95a rocks: add limit_concurrent_(stores|loads|removes) options
Allow enabling a semaphore to specify concurrency constraints
for each of the spool operations.

This can help to avoid spawning hundreds of tokio blocking threads
that will just sit waiting for rocksdb to complete; the main saving
here is memory, as each blocking thread has a larger amount of
stack sitting idle than the per-task memory overhead that waits
for the semaphore.
2025-02-21 09:51:15 -07:00
Wez Furlong 3fc64011eb message: add save_and_shrink_data method
We don't use this anywhere yet
2025-02-21 09:17:27 -07:00
Wez Furlong 3b9d9883cc memory: fixup setting soft limit, add more metrics
expose a count of the number of times we're in a low memory condition as
well.
2025-02-20 17:10:43 -07:00
Wez Furlong f3fd2d9691 docs: fixup tags page
The tags plugin was rewritten and broke the old way of pulling
in the tags; update that page, and include it in the toc.
2025-02-20 16:00:16 -07:00
Wez Furlong 8407ae5d28 kumo-server-memory: fixup warning in cargo doc
These look like html tags that are not closed; quote them
2025-02-20 15:58:52 -07:00
Wez Furlong 7cf6b93783 memory: allow setting soft and low memory limit/thresholds
If you have a lot of RAM, using only default percentages could
potentially leave some RAM unused.  These lua functions
allow more precise control over the limits.
2025-02-20 12:06:12 -07:00
Wez Furlong 1ce8239dd9 add kumo.string.eval_template function 2025-02-20 08:52:04 -07:00
Wez Furlong 9f4a2590c6 templating: expose more of minijinja-contrib 2025-02-20 08:52:04 -07:00
MHillyer 61bf9b77cc Linter fixes. 2025-02-20 13:04:57 +00:00
MHillyer c4a6f22b25 Add a note to the index to let the reader know that the referene manual is the most current at any given time. 2025-02-20 10:05:09 +00:00
Wez Furlong 45d8449c69 message: add msg:shrink() and msg:shrink_data() methods
These are helpful when explicitly managing memory overheads
2025-02-19 15:55:12 -07:00
Wez Furlong 16dd0f98fc classify: don't run rebinds through bounce classifier
They aren't bounces, so no need to spend the CPU on that effort
2025-02-19 14:43:16 -07:00
Wez Furlong 28e864576e kumod: add env var to control number of worker threads in main runtime
Previously, you could use the standard TOKIO_WORKER_THREADS env
var for this purpose, but since we configure a number of tokio runtimes,
it feels better to split this out into its own separate env var.
2025-02-19 14:14:09 -07:00
Wez Furlong 4d8f03afd4 queue: add faster path for deferred injection insertion
This shaves off some source suspension checks and other locking
overheads that can never apply to the deferred injection queue
2025-02-19 12:52:39 -07:00
Wez Furlong 6907144d1b kumod: rename tokio worker threads
we have more tokio-runtime-w threads showing up than I'd like
to see, this will help to identify where they are coming from.
2025-02-19 12:37:07 -07:00
Wez Furlong bb35ffdb19 ready_queue: add ready queue insertion latency histogram 2025-02-19 12:36:00 -07:00
Wez Furlong d163531c87 refactor: extract guts of readyq_spawn function 2025-02-19 10:06:26 -07:00
Wez Furlong 35e5445944 allow specifying the readyq thread pool for an egress path 2025-02-19 08:57:37 -07:00
Wez Furlong 71098e4944 add kumo.spawn_thread_pool function
This spawns a new Runtime with the specified name and number
of threads.

It is intended to be called from the pre_init event handler.

Nothing else in the code can consume these at this time.
2025-02-19 08:25:51 -07:00
Wez Furlong 35c0166869 server-runtime: adopt parking_lot::Mutex 2025-02-19 08:11:07 -07:00
Wez Furlong a9507438be server-runtime: own name_prefix string 2025-02-19 08:07:57 -07:00
Wez Furlong 01270439f0 server-runtime: extract RuntimeInner 2025-02-19 08:06:48 -07:00
Wez Furlong ede2ac3e65 shaping: downgrade MX resolution error message in provider match 2025-02-13 15:44:44 -07:00
Wez Furlong f210a95e37 dkim helper: fixup vault usage
Appending `.key` to the implicit vault path doesn't make a lot
of sense.

Removing extraneous slash from example in the docs.
2025-02-13 14:42:16 -07:00
Wez Furlong e6cf0ad74f shaping: skip provider rules for http site names
this avoids logging a spurious but noisy error like this:

kumo_api_types::shaping: Error resolving MX for
http://127.0.0.1:8008.tsa.kumomta: proto error: Malformed label:
http://127. Provider gmail match rules will be ignored
2025-02-13 14:28:56 -07:00
Wez Furlong 8637a2adfe memoize: add len metamethod to MemoizedTable
refs: https://github.com/KumoCorp/kumomta/pull/343
2025-02-12 12:02:26 -07:00
Ryan Bonnell 9a19328f32 Fix mispelling in comment 2025-02-11 19:32:01 -07:00
Wez Furlong 774c5b04e6 docs: fixup to reflect how timeout is specified for the http client 2025-02-11 11:57:55 -07:00
Ryan Bonnell 9f71496d3e Omit duplicate character in sentence 2025-02-10 15:35:26 -07:00
Wez Furlong 3a5a01f752 cargo update
closes: https://github.com/KumoCorp/kumomta/pull/340
2025-02-10 14:17:56 -07:00
Mike Hillyer fdcc027a47 Add references to the Docker examples to the relevant User Guide pages. 2025-02-10 09:48:37 -05:00
Wez Furlong a2904155fe fix: using commas in display name w/ injection api 2025-02-10 07:39:09 -07:00
Ryan Bonnell d1632059ca Remove duplicate word 2025-02-08 07:29:41 -07:00
Ryan Bonnell b5bd819b87 Fix verb usage and improve text replacement example (#338)
* Fix passive verb usage

* Add clarity to text replacement example
2025-02-07 06:13:14 -07:00
Ryan Bonnell e127f56899 Fix misspelled word 2025-02-07 06:12:31 -07:00
Ryan Bonnell 3134722537 Fix misspelling 2025-02-06 16:48:55 -07:00
Wez Furlong d331df5965 dkim: add separate key cache to signer machinery
The signer cache maps the signer parameters to a pre-made
signing context.

It is essentially a map of (domain, key) -> signer.

Assuming that the (domain,key) tuple is unique, then this is
a good, effective use of that cache.

However, if multiple domains can share the same key then we
can end up re-parsing the same key data for each of them,
which is moderately expensive and a waste of CPU.

This commit introduces an additional cache for the key source to
the resultant compiled key.

This allows sharing of the same compiled key across signing
parameters that otherwise vary, and should help to shave off
some latency.
2025-02-06 16:47:15 -07:00
Wez Furlong 832121e337 dkim: avoid creating unused threads for SIGN_POOL
We only use the blocking threads portion of the thread pool,
so avoid the default of creating number-of-cores threads
for the IO portion.  We have to create one even though we
don't use it, otherwise tokio is unhappy.
2025-02-06 16:47:14 -07:00
Ryan Bonnell 6e39c91295 Edit words 2025-02-06 13:58:49 -07:00
Ryan Bonnell 8372c9d733 Remove errant backtick from sample code block 2025-02-06 13:58:12 -07:00
Wez Furlong 3d22151d14 add SingletonTimerWheelV2 strategy option
This uses our new leaner timeq data structure; that has lower
memory overhead and is a bit more efficient at ticking.

It is not the default at this time, but ideally will become
the default in the future once it has been proven out.
2025-02-06 13:38:06 -07:00
Wez Furlong 7a12d37b5b roll our own timeq
This one uses our intrusive list so that the memory overhead is
constant, and allows us to iterate the contents, retain() style.
2025-02-06 12:38:08 -07:00
Wez Furlong 0ab606cfee memoize: make epoch-based invalidation optional
It is not always desirable to invalidate with the epoch,
so allow opting in instead of always invalidating that way.
2025-02-06 11:06:25 -07:00
Ryan Bonnell 97eb27c62e Improve code formatting and update grammar (#333)
* Add code formatting for readability

* Update verb tense
2025-02-05 13:06:02 -07:00
Wez Furlong 3cc9728b20 docs: tags_file option is no longer needed for doc build 2025-02-05 11:24:45 -07:00
Wez Furlong 33dcc6b003 docs: changelog for #331 2025-02-05 11:22:46 -07:00
Wez Furlong cf09289579 dkim: allow duration strings to be used for signer ttls
This is a nice convenience
2025-02-05 11:22:46 -07:00
Ryan Bonnell ebb34dec7b Add missing space in sentence 2025-02-05 11:22:35 -07:00
ncai 38484d0bf3 add unmask to enable installing kumomta over kumomta-dev and the other way around 2025-02-05 11:19:27 -07:00