The first test at 1000 RPS showed pretty poor performance (although still drastically better than the node-postgres driver). Subsequent tests at 1000 RPS showed great performance, possibly due to the impact of prepared statements from previous tests. With this change, performance at 1000 RPS is satisfactory and the next goal is a similar performance at 2000 RPS.
With this change, RPS seems to top out at about 1000, given the requests at 2000 requests/s.
Changing the max number of connections to the postgres server from 10 to 50 or 100 actually produced significantly worse performance, so I will keep it at 10 connections.
Conclusion
Overall, performance improved significantly. I will be incorporating these changes into main.
postgres.js driver performance
Analysis
The first test at 1000 RPS showed pretty poor performance (although still drastically better than the
node-postgres
driver). Subsequent tests at 1000 RPS showed great performance, possibly due to the impact of prepared statements from previous tests. With this change, performance at 1000 RPS is satisfactory and the next goal is a similar performance at 2000 RPS.With this change, RPS seems to top out at about 1000, given the requests at 2000 requests/s.
Changing the max number of connections to the postgres server from 10 to 50 or 100 actually produced significantly worse performance, so I will keep it at 10 connections.
Conclusion
Overall, performance improved significantly. I will be incorporating these changes into
main
.