aboutsummaryrefslogtreecommitdiff
path: root/website/content/en/status/report-2021-04-2021-07/racct.adoc
diff options
context:
space:
mode:
Diffstat (limited to 'website/content/en/status/report-2021-04-2021-07/racct.adoc')
-rw-r--r--website/content/en/status/report-2021-04-2021-07/racct.adoc28
1 files changed, 28 insertions, 0 deletions
diff --git a/website/content/en/status/report-2021-04-2021-07/racct.adoc b/website/content/en/status/report-2021-04-2021-07/racct.adoc
new file mode 100644
index 0000000000..22e9b82ad5
--- /dev/null
+++ b/website/content/en/status/report-2021-04-2021-07/racct.adoc
@@ -0,0 +1,28 @@
+=== Racct (Resource Accounting) Bug Fixes and Improvements
+
+Links: +
+link:https://github.com/samuelkarp/runj/pull/11[racct PR for runj] URL: link:https://github.com/samuelkarp/runj/pull/11[https://github.com/samuelkarp/runj/pull/11]
+
+Contact: Cyril Zhang <cyril@freebsdfoundation.org>
+
+racct is a resource accounting system in the FreeBSD kernel.
+It keeps track of resource usage, such as memory use and CPU runtime.
+Additionally, it provides an easy interface for limiting the resource usage of entities such as users and, importantly, jails.
+For example, it may be of interest to set a limit on the number of CPUs that a jail can use.
+
+I have been discussing with other FreeBSD developers the prospect of adding racct support as an experimental feature to an OCI-compliant container runtime, runj by Samuel Karp.
+This would mimic Linux's cgroups functionality in the OCI specification, which allows Linux containers to have limits on memory, CPU usage, etc.
+It also allows us to consider the possibility of adding FreeBSD-specific configuration to the OCI specification.
+As part of this work, I have been improving racct so that it is more functional for use with jails.
+
+Improvements include:
+
+* A new, more accurate scheme for calculating total CPU usage of all processes in a jail
+* Fixing a bug that incorrectly counted the runtime of all child processes in the parent's runtime
+* Fixing a bug that incorrectly decremented the count of persistent resources, such as shared memory, when a process exits
+* Accounting for POSIX features like shared memory and semaphores, where previously only SysV features were accounted for
+* Adding tests
+
+Feel free to get in touch.
+
+Sponsor: The FreeBSD Foundation