X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 29B4B9DCC77 for ; Mon, 27 Mar 2006 11:31:45 -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 89960-06 for ; Mon, 27 Mar 2006 11:31:49 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id DD58D9DCBC1 for ; Mon, 27 Mar 2006 11:31:42 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k2RFVlOB014560; Mon, 27 Mar 2006 10:31:47 -0500 (EST) To: Thomas Hallgren cc: Martijn van Oosterhout , PostgreSQL-development , PL/Java Development Subject: Re: Shared memory In-reply-to: <4427A8F1.3020009@tada.se> References: <4423CF32.3060406@tada.se> <20060324125851.GC8718@svana.org> <4427A8F1.3020009@tada.se> Comments: In-reply-to Thomas Hallgren message dated "Mon, 27 Mar 2006 10:57:21 +0200" Date: Mon, 27 Mar 2006 10:31:47 -0500 Message-ID: <14559.1143473507@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.114 required=5 tests=[AWL=0.114] X-Spam-Score: 0.114 X-Spam-Level: X-Archive-Number: 200603/1150 X-Sequence-Number: 81548 Thomas Hallgren writes: > The real downside is that a call from SQL to PL/Java using the current > in-process approach is really fast. It takes about 5 micro secs on my > 2.8GHz i386 box. The overhead of an IPC-call on that box is about 18 > micro secs on Linux and 64 micro secs on Windows. That's an overhead > of between 440% and 1300% due to context switching alone. Yet, for > some applications, perhaps that overhead is acceptable? It's only that much difference? Given all the other advantages of separating the JVM from the backends, I'd say you should gladly pay that price. regards, tom lane