X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id B4599D1DE21; Thu, 4 Dec 2003 06:22:43 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 76284-10; Thu, 4 Dec 2003 02:22:13 -0400 (AST) Received: from smtp.tor.pathcom.com (smtp.tor.pathcom.com [209.250.128.26]) by svr1.postgresql.org (Postfix) with ESMTP id 19CC1D1B49E; Thu, 4 Dec 2003 02:22:10 -0400 (AST) Received: from sinope.axxent.ca (v47.wall.tor.axxent.ca [209.250.131.207]) by smtp.tor.pathcom.com (8.12.9/8.12.6) with ESMTP id hB46MAKu018309; Thu, 4 Dec 2003 01:22:10 -0500 (EST) Received: by sinope.inside.pathcom.com with Internet Mail Service (5.5.2653.19) id ; Thu, 4 Dec 2003 01:22:10 -0500 Message-ID: From: "Passynkov, Vadim" To: "'pgsql-general@postgresql.org'" Cc: "'pgsql-performance@postgresql.org'" Subject: Async Query Processing on Solaris Date: Thu, 4 Dec 2003 01:22:08 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/260 X-Sequence-Number: 53654 I am using Asynchronous Query Processing interface from libpq library. And I got some strange results on Solaris My test select query is 'SELECT * from pg_user;' and I use select system synchronous I/O multiplexer in 'C' The first test sends 10000 select queries using 10 nonblocking connections to database ( PQsendQuery ). The second test sends the same 10000 select queries using 1 connection ( PQexec ). On FreeBSD there is a huge difference between the async and the sync tests. The async test is much faster than sync test. On Solaris there is no speed difference between async and sync test, actually async test is even slower than sync test. Q. Why ? On FreeBSD: /usr/bin/time ./PgAsyncManager async async test start ... 10000 done 9.46 real 3.48 user 1.25 sys /usr/bin/time ./PgAsyncManager sync sync test start ... 10000 done 22.64 real 3.35 user 1.24 sys On Solaris: /usr/bin/time ./PgAsyncManager async async test start ... 10000 done real 20.6 user 2.1 sys 0.4 /usr/bin/time ./PgAsyncManager sync sync test start ... 10000 done real 18.4 user 1.1 sys 0.5