7

What is the memory/cpu/other requirements to run PostgreSQL database server efficiently ? Is a way to appoint a hardware configuration for some sort of requirements - for example number of users, number of queries etc ?

10

PostgreSQL is open source and you can use on almost any Linux/UNIX-like machine, plus Windows and Mac OS X. See the buildfarm for a list of known-working configurations. Precompiled binary installers and/or packages are available for popular platforms. I had some problems compiling it on AIX, but it was because I used gcc instead of IBM's XLC.

The minimum RAM you will need is 32MB, and you'll need least 50KB of disk space. As with any other database everything depends of the queries you are going to do, how many users you will have, what your performance requirements are, etc.

If you can, try to divide your DB between different physical hard drives (eg WAL on one, main tables + indexes on another), tune postgresql.conf to fit your machine, etc.

I recommend that you to read Greg Smith's book PostgreSQL High Performance.

  • 3
    50KB of disk space?? – Antony Hatchkins Jan 15 '16 at 10:36
  • What about CPU? and are you sure 50KB? – VaTo Feb 7 '17 at 21:28
  • I wrote it a long time ago, so I don't remember about this 50K. As far as I can remember 50K was for the database (not the application itself), however let's face the reality, it will quickly grow to much more than that. – Hola Soy Edu Feliz Navidad Feb 14 '18 at 17:02
3

First, the minimum requirements will be met by almost any machine. PostgreSQL can start and run (for a small db with few concurrent connections!) on very modest hardware. As of 9.2 you can get linear scalability for reads up to about 64 cores, and for writes up to around 20 cores, if I understand Robert Haas's blog posts correctly. In general you need less CPU speed and more cores, and better disk I/O to get the best performance.

So PostgreSQL scales down pretty well, and it also scales up quite well. As for your questions about configuration, you can set maximum number of users, max timeouts for queries, and logging of slow queries in the postgresql.conf.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.