X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 658D49DD559 for ; Tue, 21 Mar 2006 08:51:13 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 63700-05 for ; Tue, 21 Mar 2006 08:51:16 -0400 (AST) X-Greylist: delayed 00:06:37.827925 by SQLgrey- Received: from mail.webrainstorm.it (mail.webrainstorm.it [213.92.79.132]) by postgresql.org (Postfix) with SMTP id AA51F9DD539 for ; Tue, 21 Mar 2006 08:51:10 -0400 (AST) Received: (qmail 13146 invoked from network); 21 Mar 2006 12:44:14 -0000 Received: from unknown (HELO mgmt1.webrainstorm.it) (81.174.12.48) by webrainstorm.it with SMTP; 21 Mar 2006 12:44:13 -0000 Message-Id: <7.0.0.16.2.20060321115738.060f9078@webrainstorm.it> X-Mailer: QUALCOMM Windows Eudora Version 7.0.0.16 Date: Tue, 21 Mar 2006 13:46:16 +0100 To: pgsql-performance@postgresql.org From: Edoardo Serra Subject: Postmaster using only 4-5% CPU Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200603/399 X-Sequence-Number: 17836 Hi all, I'm having a very strange performance=20 problems on a fresh install of postgres 8.1.3 I've just installed it with default option and=20 --enable-thread-safety without tweaking config files yet. The import of a small SQL files into the DB (6=20 tables with 166.500 total records, INSERT syntax) took me more than 18 minutes as shown below=20 (output of "time ./psql benchmarks < dump.sql") real 18m33.062s user 0m10.386s sys 0m7.707s The server is an - Intel(R) Xeon(TM) CPU 3.60GHz - 1MB L2 - 1 GB RAM - 2x HDD SCSI U320 RAID 1 Hardware (HP 6i controller) The same import, tried on an another low-end=20 server with a fresh install of postgres 8.1.3 gave me: real 2m4.497s user 0m6.234s sys 0m6.148s During the test, the postmaster on the first=20 server (the slow one) uses only a 4% CPU, while=20 on the second one it reaches 50% cpu usage I was thinking on a IO bandwidth saturation, but=20 "vmstat 1" during the import shows me small values for io/bo column Searching the archive of the ml I found a Disk IO=20 test I suddenly ran on the slower server as follow # time bash -c "dd if=3D/dev/zero of=3Dbigfile bs=3D8k=20 count=3D200000 && sync" (write test) # time dd if=3Dbigfile of=3D/dev/null bs=3D8k (read test) output of "vmstat 1" during the above test follows: procs -----------memory---------- ---swap-- -----io---- --system--= ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id= wa Write test 0 11 540 2344 12152 863456 4 0 340 27848 1709 695 6 53 0= 41 0 11 540 2344 12180 863516 4 0 44 45500 1623 386 0 2 0= 98 0 5 540 3168 12200 862520 0 0 264 44888 1573 315 1 2 0= 97 Read test 0 2 440 2328 6076 849120 0 0 94552 0 1550 624 3 10 0= 87 0 2 440 2248 6104 848936 0 0 94508 0 1567 715 7 10 0= 83 0 3 440 2824 6148 847828 0 0=20 102540 448 1511 675 14 11 0 75 Values of io/(bi-bo) during the disk test are a=20 lot higher than during the import operation.... I really have no more clues .... :( Do you have any ideas ? Tnx in advance Regards Edoardo Serra WeBRainstorm S.r.l. IT, Internet services & consulting Via Pio Fo=E0 83/C 10126 Torino Tel: +39 011 6966881