Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id BDADDB5DC69 for ; Mon, 5 Sep 2011 07:35:07 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 55246-06 for ; Mon, 5 Sep 2011 10:35:01 +0000 (UTC) X-Greylist: delayed 00:06:38.719485 by SQLgrey-1.7.6 Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mail.postgresql.org (Postfix) with ESMTP id 3095EB5DC5F for ; Mon, 5 Sep 2011 07:35:00 -0300 (ADT) Received: by wwe5 with SMTP id 5so3861406wwe.1 for ; Mon, 05 Sep 2011 03:35:00 -0700 (PDT) Received: by 10.227.134.73 with SMTP id i9mr3764291wbt.72.1315218501034; Mon, 05 Sep 2011 03:28:21 -0700 (PDT) Received: from [192.168.121.74] ([85.133.43.170]) by mx.google.com with ESMTPS id et17sm7704425wbb.0.2011.09.05.03.28.19 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 05 Sep 2011 03:28:20 -0700 (PDT) From: Richard Shaw Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Rather large LA Date: Mon, 5 Sep 2011 11:28:19 +0100 Message-Id: To: pgsql-performance@postgresql.org Mime-Version: 1.0 (Apple Message framework v1244.3) X-Mailer: Apple Mail (2.1244.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201109/30 X-Sequence-Number: 44806 Hi,=20 I have a database server that's part of a web stack and is experiencing = prolonged load average spikes of up to 400+ when the db is restarted and = first accessed by the other parts of the stack and has generally poor = performance on even simple select queries. There are 30 DBs in total on the server coming in at 226GB. The one = that's used the most is 67GB and there are another 29 that come to = 159GB.=20 I'd really appreciate it if you could review my configurations below and = make any suggestions that might help alleviate the performance issues. = I've been looking more into the shared buffers to the point of = installing the contrib module to check what they're doing, possibly = installing more RAM as the most used db @ 67GB might appreciate it, or = moving the most used DB onto another set of disks, possible SSD. PostgreSQL 9.0.4 Pgbouncer 1.4.1 Linux 2.6.18-238.9.1.el5 #1 SMP Tue Apr 12 18:10:13 EDT 2011 x86_64 = x86_64 x86_64 GNU/Linux CentOS release 5.6 (Final) 4 x Intel Xeon-NehalemEX E7540-HexCore [2GHz] ( 24 physical cores ) 32GB DDR3 RAM 1 x Adaptec 5805 Z SATA/SAS RAID with battery backup 4 x Seagate Cheetah ST3300657SS 300GB 15RPM SAS drives in RAID 10 1 x 500GB 7200RPM SATA disk Postgres and the OS reside on the same ex3 filesystem, whilst query and = archive logging go onto the SATA disk which is also ext3. name | = current_setting = =20 = --------------------------------+-----------------------------------------= --------------------------------------------------------------------------= version | PostgreSQL 9.0.4 on = x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20080704 (Red = Hat 4.1.2-48), 64-bit archive_command | tar jcf /disk1/db-wal/%f.tar.bz2 %p archive_mode | on autovacuum | off checkpoint_completion_target | 0.9 checkpoint_segments | 10 client_min_messages | notice effective_cache_size | 17192MB external_pid_file | /var/run/postgresql/9-main.pid fsync | off full_page_writes | on lc_collate | en_US.UTF-8 lc_ctype | en_US.UTF-8 listen_addresses |=20 log_checkpoints | on log_destination | stderr log_directory | /disk1/pg_log log_error_verbosity | verbose log_filename | postgresql-%Y-%m-%d_%H%M%S.log log_line_prefix | %m %u %h=20 log_min_duration_statement | 250ms log_min_error_statement | error log_min_messages | notice log_rotation_age | 1d logging_collector | on maintenance_work_mem | 32MB max_connections | 1000 max_prepared_transactions | 25 max_stack_depth | 4MB port | 6432 server_encoding | UTF8 shared_buffers | 8GB superuser_reserved_connections | 3 synchronous_commit | on temp_buffers | 5120 TimeZone | UTC unix_socket_directory | /var/run/postgresql wal_buffers | 10MB wal_level | archive wal_sync_method | fsync work_mem | 16MB Pgbouncer config [databases] * =3D port=3D6432 [pgbouncer] user=3Dpostgres pidfile =3D /tmp/pgbouncer.pid listen_addr =3D=20 listen_port =3D 5432 unix_socket_dir =3D /var/run/postgresql auth_type =3D trust=20 auth_file =3D /etc/pgbouncer/userlist.txt admin_users =3D postgres stats_users =3D postgres pool_mode =3D session=20 server_reset_query =3D DISCARD ALL; server_check_query =3D select 1 server_check_delay =3D 10=20 server_idle_timeout =3D 5 server_lifetime =3D 0 max_client_conn =3D 4096=20 default_pool_size =3D 100 log_connections =3D 1 log_disconnections =3D 1 log_pooler_errors =3D 1 client_idle_timeout =3D 30 reserve_pool_size =3D 800 Thanks in advance Richard