Skip site navigation (1) Skip section navigation (2)

Re: High CPU usage / load average after upgrading to Ubuntu 12.04

From: Dan Kogan <dan(at)iqtell(dot)com>
To: Will Ferguson <WFerguson(at)northplains(dot)com>,"pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: High CPU usage / load average after upgrading to Ubuntu 12.04
Date: 2013-02-13 01:28:41
Message-ID: 60B572D9298D944580F7D51195DD30804357FA4C11@VMBX125.ihostexchange.net (view raw or flat)
Thread:
Lists: pgsql-performance
Hi Will,

Yes, I think we've seen some discussions on that.  Our servers our hosted on Amazon Ec2 and upgrading the kernel does not seem so straight forward.
We did a benchmark using pgbench on 3.5 vs 3.2 and saw an improvement.  Unfortunately our production server would not boot off 3.5 so we had to revert back to 3.2.

At this point we are contemplating whether it's better to go back to 11.04 or upgrade to 12.10 (which comes with kernel version 3.5).
Any thoughts on that would be appreciated.

Dan

From: Will Ferguson [mailto:WFerguson(at)northplains(dot)com]
Sent: Tuesday, February 12, 2013 5:20 PM
To: Dan Kogan; pgsql-performance(at)postgresql(dot)org
Subject: Re: [PERFORM] High CPU usage / load average after upgrading to Ubuntu 12.04

Hey Dan,

If I recall correctly there were some discussions on here related to performance issues with the 3.2 kernel. I'm away at the moment so can't dig them out but there have been much discussions lately about kernel performance in 3.2 which don't seem present in 3.4. I'll see if I can find them when I'm next at my desk.

Will


Sent from Samsung Mobile



-------- Original message --------
From: Dan Kogan <dan(at)iqtell(dot)com<mailto:dan(at)iqtell(dot)com>>
Date:
To: pgsql-performance(at)postgresql(dot)org<mailto:pgsql-performance(at)postgresql(dot)org>
Subject: Re: [PERFORM] High CPU usage / load average after upgrading to Ubuntu 12.04

Thanks for the reply.  We are still using postgresql-9.0-801.jdbc4.jar.  It seemed to us that this is more related to the OS than the JDBC, version as we had the issue before we upgraded to 9.2.
It might still be worth a try.

Just out of curiosity, has anyone else experienced performance issues (or even tried) with the 9.0 jdbc driver against 9.2 server?

Dan

From: Eric Haertel [mailto:eric(dot)haertel(at)groupon(dot)com]
Sent: Tuesday, February 12, 2013 12:52 PM
To: Dan Kogan
Cc: pgsql-performance(at)postgresql(dot)org<mailto:pgsql-performance(at)postgresql(dot)org>
Subject: Re: [PERFORM] High CPU usage / load average after upgrading to Ubuntu 12.04

I don't know if it helps, but I had after update from 8.4 to 9.1 extrem problems with my local test  until I changed the JDBC driver to the propper version. I'm not shure if the load occured on the client or the server side as the local integration test run on my machine.

2013/2/12 Dan Kogan <dan(at)iqtell(dot)com<mailto:dan(at)iqtell(dot)com>>
Hello,

We upgraded from Ubuntu 11.04 to Ubuntu 12.04 and almost immediately obeserved increased CPU usage and significantly higher load average on our database server.
At the time we were on Postgres 9.0.5.  We decided to upgrade to Postgres 9.2 to see if that resolves the issue, but unfortunately it did not.

Just for illustration purposes, below are a few links to cpu and load graphs pre and post upgrade.

https://s3.amazonaws.com/iqtell.ops/Load+Average+Post+Upgrade.png
https://s3.amazonaws.com/iqtell.ops/Load+Average+Pre+Upgrade.png

https://s3.amazonaws.com/iqtell.ops/Server+CPU+Post+Upgrade.png
https://s3.amazonaws.com/iqtell.ops/Server+CPU+Pre+Upgrade.png

We also tried tweaking kernel parameters as mentioned here - http://www.postgresql.org/message-id/50E4AAB1.9040902@optionshouse.com, but have not seen any improvement.


Any advice on how to trace what could be causing the change in CPU usage and load average is appreciated.

Our postgres version is:

PostgreSQL 9.2.2 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3, 64-bit

OS:

Linux ip-10-189-175-25 3.2.0-37-virtual #58-Ubuntu SMP Thu Jan 24 15:48:03 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Hardware (this an Amazon Ec2 High memory quadruple extra large instance):

8 core Intel(R) Xeon(R) CPU E5-2665 0 @ 2.40GHz
68 GB RAM
RAID10 with 8 drives using xfs
Drives are EBS with provisioned IOPS, with 1000 iops each

Postgres Configuration:

archive_command = rsync -a %p slave:/var/lib/postgresql/replication_load/%f
archive_mode = on
checkpoint_completion_target = 0.9
checkpoint_segments = 64
checkpoint_timeout = 30min
default_text_search_config = pg_catalog.english
external_pid_file = /var/run/postgresql/9.2-main.pid
lc_messages = en_US.UTF-8
lc_monetary = en_US.UTF-8
lc_numeric = en_US.UTF-8
lc_time = en_US.UTF-8
listen_addresses = *
log_checkpoints=on
log_destination=stderr
log_line_prefix = %t [%p]: [%l-1]
log_min_duration_statement =500
max_connections=300
max_stack_depth=2MB
max_wal_senders=5
shared_buffers=4GB
synchronous_commit=off
unix_socket_directory=/var/run/postgresql
wal_keep_segments=128
wal_level=hot_standby
work_mem=8MB


Thanks,
Dan



--

Eric Härtel
Senior Software Developer

Tel.:           +49 (0) 30 240 20 40 35

Mobil:        +49 (0) 174 43 38 614
Email:       eric(dot)haertel(at)groupon(dot)com<mailto:vorname(dot)nachname(at)groupon(dot)de>



[cid:image001(dot)jpg(at)01CE095F(dot)8BDF3F90]



Groupon GmbH & Co. Service KG | Oberwallstraße 6 | 10117 Berlin
persönlich haftende Gesellschafterin: Groupon Verwaltungs GmbH, HRB 131594 B
Geschäftsführer: Mark S. Hoyt | Bradley Downes | Daniel Köllner
Eingetragen beim Amtsgericht Charlottenburg Berlin, HRA  45265 B | USt.-ID Nr. DE 279 803 459

In response to

Responses

pgsql-performance by date

Next:From: Matheus de OliveiraDate: 2013-02-13 11:00:08
Subject: Re: Partition insert trigger using C language
Previous:From: Dan KoganDate: 2013-02-12 19:59:16
Subject: Re: High CPU usage / load average after upgrading to Ubuntu 12.04

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group