|
|
Log in / Subscribe / Register

Kea’s missing transaction batching

Kea’s missing transaction batching

Posted May 31, 2025 20:07 UTC (Sat) by Sesse (subscriber, #53779)
In reply to: Kea’s missing transaction batching by DemiMarie
Parent article: Local vulnerabilities in Kea DHCP

OK, so you're basically asking that Kea buffer up changes and submit them all within one SQL transaction to the database backend? It sounds like something that is normally done in the database level (i.e., grouping fsyncs), but of course, that requires Kea to expose some parallelism as you say. (Either through async, or using more threads.) Anything else is fairly complex, as I believe Kea would want the lease commit to go through before it actually sends out the DHCPACK? (I haven't checked, I'm fine with memfile.)


to post comments

Kea’s missing transaction batching

Posted Jun 1, 2025 4:37 UTC (Sun) by DemiMarie (subscriber, #164188) [Link] (3 responses)

You are correct that the commit should happen before sending DHCPACK, but that’s easy to ensure by buffering the DHCPACK packets until the whole batch of transactions has committed. In theory, databases should do the batching you describe, but I believe at least PostgreSQL can’t due to internal limitations.

Kea’s missing transaction batching

Posted Jun 1, 2025 7:32 UTC (Sun) by Sesse (subscriber, #53779) [Link] (2 responses)

In Postgres, commit_delay governs this behavior.

Kea’s missing transaction batching

Posted Jun 1, 2025 11:40 UTC (Sun) by andresfreund (subscriber, #69562) [Link] (1 responses)

And batching happens even without that setting, if multiple transactions start to flush while another flush is in progress.

PostgreSQL parallelism

Posted Jun 2, 2025 18:59 UTC (Mon) by DemiMarie (subscriber, #164188) [Link]

Does PostgreSQL support processing multiple transactions in parallel? Can it issue writes and reads with the high queue depths needed to get optimum performance out of modern storage?


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds