Message-ID: From: "Sanne (@Sanne)" To: "pgjdbc/pgjdbc" Date: Tue, 01 Jul 2025 15:28:30 +0000 Subject: Re: [pgjdbc/pgjdbc] issue #3693: Overhead of uncontended use of ResourceLock In-Reply-To: References: List-Id: X-GitHub-Author-Login: Sanne X-GitHub-Comment-Id: 3024522463 X-GitHub-Comment-Type: issue_comment X-GitHub-Edited-At: 2025-07-01T15:33:43Z X-GitHub-Issue: 3693 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/3693#issuecomment-3024522463 Content-Type: text/plain; charset=utf-8 I have now results from a benchmark run in which the locks are being bypassed, and it looks very promising: ![Image](https://github.com/user-attachments/assets/2c4b72bd-259d-45b9-812d-cf13e658f350) The experimental patch I've been running is this one: - https://github.com/pgjdbc/pgjdbc/commit/da092f524abd228b4d2f77e45fab6cbe40f0fbb7 In the graph, the same code is being run on both the blue and green bars. The difference is the JVM property being activated on the left one. The two bars on the right represent the "512" scenario, in which we have highest CPU demand; obviously that's were this is most effective. And let me add: the patch draft is not comprehensive. It's bypassing some of the locks as a POC, but I still see some of them, so I could improve further.