Highlighted
MLWeiner Absent Member.
Absent Member.
1080 views

High Postgresql CPU

I've got a datasync server with a bit under 100 users on it mostly serving a fairly even mix of iOS and Android devices. Fully patched up, running in a VM with 2 vCPUs and 4gb RAM. The server is running well, no issues from a user side, but as of late I've noticed I can't get it below 10-15% CPU utilization (and climbing over the past few weeks - it was 5% when this problem started). I've traced it to Postgresql, and monitoring the pg_stat_activity table it seems to me to be related to the following query executing almost constantly:
SELECT * FROM Attachments WHERE state = E'1' ORDER BY tStamp ASC LIMIT 30

Manually running that query in psql returns zero results but no errors or anything. The database seems healthy, and this problem didn't pop up related to a patch or anything, it just seemed to have come up out of the blue, so I'm soliciting some opinions. Do you think it's just related to starting to pile up users on it, or do you think I may have a blown up index or something?
Labels (1)
0 Likes
1 Reply
jmarton2 Absent Member.
Absent Member.

Re: High Postgresql CPU

MLWeiner wrote:

> I've got a datasync server with a bit under 100 users on it mostly
> serving a fairly even mix of iOS and Android devices. Fully patched
> up, running in a VM with 2 vCPUs and 4gb RAM. The server is running
> well, no issues from a user side, but as of late I've noticed I can't
> get it below 10-15% CPU utilization (and climbing over the past few
> weeks - it was 5% when this problem started). I've traced it to
> Postgresql, and monitoring the pg_stat_activity table it seems to me
> to be related to the following query executing almost constantly:
> -SELECT * FROM Attachments WHERE state = E'1' ORDER BY tStamp ASC
> LIMIT 30-


The CPU utilization you report isn't really problematic. However,
having that query happen constantly isn't right either I don't believe.
As I recall there was a bug in a particular update (not a released one
but one you'd have to manually obtain from Novell) which could cause
that. If you upgrade to the latest release, 730, I'm guessing that
will go away.

--
We're your Novell--again. http://www.novell.com/promo/backtobasics.html
Enhancement Requests: http://www.novell.com/rms

Joe Marton Emeritus Knowledge Partner
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.