From a4f1a1e843ad39670aa449d4c1260ae16326e649 Mon Sep 17 00:00:00 2001 From: asonix Date: Thu, 25 Jan 2024 17:11:40 -0600 Subject: [PATCH] Add 0.5.4 release document --- releases/0.5.4.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 releases/0.5.4.md diff --git a/releases/0.5.4.md b/releases/0.5.4.md new file mode 100644 index 0000000..7728939 --- /dev/null +++ b/releases/0.5.4.md @@ -0,0 +1,33 @@ +# pict-rs 0.5.4 + +## Overview + +Another quick release to improve postgres performance, and reduce growth of the job_queue during +cleanup spikes. + +### Changes + +- [Limit LISTEN Connections](#limit-listen-connections) +- [Limit Spawned Jobs](#limit-spawned-jobs) + + +## Descriptions + +### Limit LISTEN Connections + +When postgres is configured, pict-rs sometimes issues LISTEN queries in order to be notified of new +jobs in the job queue, due to connection pooling, it would be possible for every connection pict-rs +makes to postgres to be listening for notifications. This is needless and wastes resources. 0.5.4 +now limits the number of connections issuing LISTEN queries to at most 4, or as few as the number of +cores in your machine, if less than 4. + + +### Limit Spawned Jobs + +As mentioned in the 0.5.2 release document, pict-rs runs cleanup jobs that can spawn a lot of other +jobs. In order to keep the queue size from growing too large for larger deployments, pict-rs now +limits each general cleanup job to 2048 iterations, meaning it will complete after spawning just +2048 jobs. + +Since pict-rs processes jobs in-order, this means that the majority of these jobs will be completed +before the next general cleanup job runs, keeping the maximum number of queued jobs around 2048.