Replies: 1 comment
-
@chaporgin hi, I'm wondering if you've tried our benchmarking tool Together with the As far as the CPU usage you're seeing, I'm guessing it has more to do with how you're spawning N simultaneous transactions at the same moment and quickly committing them all.
Notably, the database/sql driver today doesn't support I'd expect that the notifier allows you to tune your clients to poll less frequently but still have low latency when a new job is inserted, i.e. a situation where you don't tend to have a sitting backlog of jobs and want to lower the polling load on your database. I'm not sure it will matter much with throughput benchmarking though. |
Beta Was this translation helpful? Give feedback.
-
Hello, thank you for the library. I have questions regarding performance. I am using a database/SQL (so not LISTEN/NOTIFY). I also removed the UNLOGGED from
CREATE TABLE
statements (which should not affect the performance IIUC because I have only three workers).I have three workers and db.r6g.xlarge with 4vCPU/32GiB and 20000 IOPS. I have a binary that wakes up every second and spawns a goroutine that is not using InsertTxMany, inserting a number of no-op jobs. The number is configurable, and I have tried with 50, 100, 350, and 500.
I see that the binary cannot keep up with a 1-second interval. An example is shown for 50 jobs per second. The code of the binary is the following:
The driver is limited with 450 max open connections.
The database is in the same AWS region and VPC as the VM running the binary.
I see the spike in IOPS, which is OK (?), but the spike in CPU consumption and the insertion speed are unexpected, too, so I seem to be getting less than 50 TPS per second.
Do you know if this is expected? Would moving from polling to LISTEN/NOTIFY make the situation better? Any ideas are appreciated!
Beta Was this translation helpful? Give feedback.
All reactions