0

Disclaimer: I'm relatively new to Postgres.

On my production EC2 DB server, I'm experiencing high CPU usage on two of the five CPUs, ultimately resulting in latency for users of my application.

I've noticed that Postgres appears to only run two processes by default. How might I increased the default number of Postgres processes and thus allow for better spreading out of the load?

I'm using Rails/ActiveRecord on the application server if it makes a difference.

user67856
  • 129
  • 1
  • 6

1 Answers1

3

If you want more backends (the processes that actually process queries) running, connect more clients.
Postgres spawns a separate backend for each connection.

Beyond that, what your asking makes no sense if you know how Postgres internals work.

I suggest you start by reading and understanding how Postgres uses processes.

Then when you're done reading that go read about how to go about optimizing Postgres performance properly.

voretaq7
  • 79,879
  • 17
  • 130
  • 214