Postgres performance issues

前端 未结 4 1603
忘了有多久
忘了有多久 2021-02-05 17:09

We are running Postgres 9.1.3 and we have recently started to run into major performance problems on one of our servers.

Our queries ran fine for a while, but as of Augu

4条回答
  •  野性不改
    2021-02-05 17:44

    It's difficult to be sure, but I think you are right to be suspicious of I/O issues. What can happen is that as tables get larger or connections are increased then cache hits start to fall. That increases I/o demands and slows everything down. Meanwhile, more queries arrive, making the problem worse. The situation is complicated for you because virtual disks don't necessarily behave the same as physical ones.

    Firstly you will need to measure actual activity on the VM (through vmstat or iostat perhaps). Secondly, do the same on the real hardware. Finally, run some standard disk bandwidth tools on both (in particular random read/write mixes). Now you'll be able to say how much of your available I/o is being used.

    As for query plans, without the schema details and explain analyse output no-one can say.

    You will find the postgresql.org mailing list useful even if just for the archives. Also, the book linked below is excellent.

    http://www.packtpub.com/postgresql-90-high-performance/book

提交回复
热议问题