Skip to content

Commit 342eac7

Browse files
committed
update readme in preparation for next release
1 parent 548d06f commit 342eac7

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,13 @@ the fapolicyd configuration directory. There is a new utility, fagenrules,
250250
which will compile the rules into a single file, compiled.rules, and place the
251251
resulting file in the main config directory.
252252

253+
Starting with 2.0, fagenrules validates the generated candidate with the daemon
254+
policy parser before installation. It syncs and atomically renames a validated
255+
candidate into `compiled.rules`, leaving the installed file in place until the
256+
replacement is ready. It prints a SHA-256 ruleset identity when the rules are
257+
unchanged or successfully updated. Use `fagenrules --check` to determine
258+
whether the assembled policy needs an update without replacing `compiled.rules`.
259+
253260
If you want to migrate your existing rules, just move them as is to the rules.d
254261
directory. You cannot have both compiled.rules and fapolicyd.rules. The
255262
fagenrules will notice this and put a warning in syslog. If you use fapolicyd-cli --list, it will also notice and warn. If you do have both files, the old rules
@@ -340,6 +347,21 @@ had a common denominator. Some primes you might consider for cache size are:
340347
2039, 4099, 6143, 8191, 10243, 12281, 16381, 20483, 24571, 28669, 32687,
341348
40961, 49157, 57347, 65353, etc.
342349

350+
## Decision worker tuning
351+
352+
Starting with 2.0, `decision_threads` controls the number of decision workers.
353+
The default is `1`. Each worker has its own event queue, subject cache, object
354+
cache, and subject defer array, so `q_size`, `subj_cache_size`, and
355+
`obj_cache_size` are per-worker values. This setting requires a daemon restart.
356+
357+
Increase the worker count only after observing persistent queue pressure under a
358+
representative workload: a high inter-thread queue depth relative to `q_size`,
359+
a non-zero queue-full count, or a growing oldest queued age. Start with two
360+
workers and compare the per-worker queue, cache, and defer data before making
361+
another change. A busy single PID remains on one stable worker, so one hot
362+
worker and idle peers can indicate workload skew rather than a need to
363+
continually increase the count.
364+
343365
For day to day monitoring, `fapolicyd-cli --check-status` reports daemon
344366
health and configuration state, while `fapolicyd-cli --check-metrics` reports
345367
runtime counters. The status report includes health indicators such as kernel
@@ -563,6 +585,12 @@ journalctl -b -u fapolicyd.service
563585
```
564586
to list out any events since boot by the fapolicyd service.
565587

588+
On systemd builds with watchdog support, the installed service uses
589+
`Type=notify`, `WatchdogSec=10s`, and `Restart=on-failure`. The health monitor
590+
refreshes the watchdog while decision workers make progress. Adjust the
591+
watchdog with a systemd drop-in rather than editing the packaged unit; see
592+
[the systemd watchdog documentation](doc/systemd-watchdog.md).
593+
566594
Starting with 1.1, fapolicyd-cli includes diagnostic and maintenance
567595
capabilities.
568596

@@ -583,6 +611,7 @@ capabilities.
583611
| --timer-start | 1.5 | Alias for --timing-start. |
584612
| --timer-stop | 1.5 | Alias for --timing-stop. |
585613
| --compact-trustdb | 1.6 | Rebuild and compact the daemon trustdb LMDB environment. |
614+
| --check-status and --check-metrics | 2.0 | Include aggregate and per-decision-worker health, queue, cache, and defer data. |
586615

587616

588617

@@ -718,6 +747,10 @@ cd deb
718747
To build the `.deb` package that uses the `debdb` backend.
719748
You must add rules to `/etc/fapolicyd/rules.d/` and change configuration
720749
in `/etc/fapolicyd/fapolicyd.conf` to use `trust=debdb` after installation.
750+
The `debdb` import applies `fapolicyd-filter.conf` before package-owned paths
751+
enter the trust database. On package sets where the filter excludes many files,
752+
this reduces the active LMDB footprint and can reduce memory residency and
753+
improve trust lookup time.
721754

722755
Also, if the distribution is very small, you can use the file trust database
723756
file. Just add the places where libraries and applications are stored.

0 commit comments

Comments
 (0)