https://pgtune.leopard.in.ua/#/
Are you monitoring your machine to check if it is not starving on cpu?
Re the queries, we have been using pgbadger to collect metrics about the usage of the dB and the slowest queries by type. This is helpful as it guides where you should put your efforts.
https://github.com/darold/pgbadger/blob/master/README.md
This is very good ref about scaling Postgres.
https://pyvideo.org/pycon-ca-2017/postgres-at-any-scale.html