2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2024-11-14 00:13:59 +00:00
pict-rs/releases/0.5.4.md

1.2 KiB

pict-rs 0.5.4

Overview

Another quick release to improve postgres performance, and reduce growth of the job_queue during cleanup spikes.

Changes

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.