From: | Bill Moran <wmoran(at)potentialtech(dot)com> |
---|---|
To: | "657985552(at)qq(dot)com" <657985552(at)qq(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: ??: postgres cpu 100% need help |
Date: | 2015-10-27 17:14:27 |
Message-ID: | 20151027131427.5600502aeeca99fcfc8b4e85@potentialtech.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, 27 Oct 2015 11:30:45 +0800
"657985552(at)qq(dot)com" <657985552(at)qq(dot)com> wrote:
> Dear sir:
> Recently a wired question about postgresql database really bothered me a lot, so i really need your help. Here is the problem, in the most situations the postgre database work very well, Average 3500tps/s per day, the cpu usage of its process is 3%~10% and every query can be responsed in less than 20ms, but sometimes the cpu usages of its process can suddenly grow up to 90%+ , at that time a simple query can cost 2000+ms. ps: My postgresql version is 9.3.5 and the database is oltp server.
9.3.5 is pretty old, you should probably schedule an upgrade.
> shared_buffers | 25GB
Try setting this to 16GB. It's been a while since I tested on
large-memory/high-load systems, but I seem to remember that
shared_buffers above 16G could cause these sorts of intermittant
stalls.
If that doesn't improve the situation, you'll probably need to
provide more details, specifically the layout of the table in
question, as well as the queries that are active when the
problem occurs, and the contents of the pg_locks table when
the problem is occurring.
--
Bill Moran
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2015-10-27 18:35:33 | Re: ??: postgres cpu 100% need help |
Previous Message | Josh Berkus | 2015-10-27 16:54:30 | Anyone in Indianapolis? Meetup on Dec. 3? |