Return-Path: X-Original-To: apmail-arrow-dev-archive@minotaur.apache.org Delivered-To: apmail-arrow-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EAE2118EF3 for ; Tue, 15 Mar 2016 23:03:28 +0000 (UTC) Received: (qmail 40728 invoked by uid 500); 15 Mar 2016 23:03:23 -0000 Delivered-To: apmail-arrow-dev-archive@arrow.apache.org Received: (qmail 40667 invoked by uid 500); 15 Mar 2016 23:03:23 -0000 Mailing-List: contact dev-help@arrow.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@arrow.apache.org Delivered-To: mailing list dev@arrow.apache.org Received: (qmail 40655 invoked by uid 99); 15 Mar 2016 23:03:23 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Mar 2016 23:03:23 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 786F91A04FA for ; Tue, 15 Mar 2016 23:03:22 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.021 X-Spam-Level: X-Spam-Status: No, score=-0.021 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=cloudera-com.20150623.gappssmtp.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 4m_LvPipi032 for ; Tue, 15 Mar 2016 23:03:21 +0000 (UTC) Received: from mail-yw0-f177.google.com (mail-yw0-f177.google.com [209.85.161.177]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 08FF45F3F5 for ; Tue, 15 Mar 2016 23:03:21 +0000 (UTC) Received: by mail-yw0-f177.google.com with SMTP id g3so40823710ywa.3 for ; Tue, 15 Mar 2016 16:03:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudera-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=EzjeqPgw+Mmr9dXxczteJGB+cV4I3juw++IJz+I1x68=; b=QPafuUAfpJTzt9hmoq0YRYmmaQH1S1ANnQ+B1zXgCGrkalPXJKOpokAaSmDyuIAUH7 f+BZ6Kkqw79EgHGrfzCqFKUpj1mJT/ix1GYQ26FaqItWXzEOtYR1NW6iXnp8LoOKnqv0 cGSgbggIHm7niEgAF3EB1Ji79pviPH2RY2ErsRceHl+gZyuaIOpUwjEP925fkca+TDpH 83hs98vUewkMFVMMCx5UGSdeh54rJsZr6xi7DP9r7WOFPqNzICoXD/NJXtF6Z+O6/Xvc ONVqnXLbLd3B1qCFspjBq6Z7m5i8cCSkKXLDR3WtEFvEb2Xi8FeWQfLD4iPLxn+83sxG gfhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=EzjeqPgw+Mmr9dXxczteJGB+cV4I3juw++IJz+I1x68=; b=C5fC/6DhqYpjiNDARl4x81C04AjTOltpRtSmINtRoLeq5VbJxUTICeeV/kROS3NV/6 twfcdhg/RJOkjGcDn4ITay3CsvtKf36DhLdSa9LBNmhTpcOkXM+t4bPJXQBIv8IRLCOl GBkhxo7wJpszIWsIVWPKONjvvXTdQUcnv2jY/8bi5PwGsCbRdcldQDRB7C/cndyIDobj 1beTjD9ItaPUL4sf1sUde0uQ5OVuSSuImEk57BgJ/Rt0TjHYU0kbLrvPPtMaN/JAL+U+ y9Zlm84QEriG3tgYCjWjYAa9uGnf2h7QEULWTcySrrXTidHJMQJCypEm+2qZ0SXf2IG2 HzrQ== X-Gm-Message-State: AD7BkJIlzk7hAdp9z7sjJpSbejTAPnQRggv2DM+XIsGd9ldq4/ZGChkSvgtjqQavUJFGyAOkV+eaQaV/2zE8W24B X-Received: by 10.13.222.132 with SMTP id h126mr352998ywe.104.1458082999914; Tue, 15 Mar 2016 16:03:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.44.82 with HTTP; Tue, 15 Mar 2016 16:02:40 -0700 (PDT) In-Reply-To: <72A2BCFD-54D7-4376-8199-04A5535D86C0@gmail.com> References: <72A2BCFD-54D7-4376-8199-04A5535D86C0@gmail.com> From: Wes McKinney Date: Tue, 15 Mar 2016 16:02:40 -0700 Message-ID: Subject: Re: Understanding "shared" memory implications To: dev@arrow.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable My understanding is that you can use java.nio.MappedByteBuffer to work with memory-mapped files as one way to share memory pages between Java (and non-Java) processes without copying. I am hoping that we can reach a POC of zero-copy Arrow memory sharing Java-to-Java and Java-to-C++ in the near future. Indeed this will have huge implications once we get it working end to end (for example, receiving memory from a Java process in Python without a heavy ser-de step -- it's what we've always dreamed of) and with the metadata and shared memory control flow standardized. - Wes On Wed, Mar 9, 2016 at 9:25 PM, Corey J Nolet wrote: > If I understand correctly, Arrow is using Netty underneath which is using= Sun's Unsafe API in order to allocate direct byte buffers off heap. It is = using Netty to communicate between "client" and "server", information about= memory addresses for data that is being requested. > > I've never attempted to use the Unsafe API to access off heap memory that= has been allocated in one JVM from another JVM but I'm assuming this must = be the case in order to claim that the memory is being accessed directly wi= thout being copied, correct? > > The implication here is huge. If the memory is being directly shared acro= ss processes by them being allowed to directly reach into the direct byte b= uffers, that's true shared memory. Otherwise, if there's copies going on, i= t's less appealing. > > > Thanks. > > Sent from my iPad