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.