From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 19:28:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15416CC2 for ; Sun, 22 Mar 2015 19:28:33 +0000 (UTC) Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D9CB3998 for ; Sun, 22 Mar 2015 19:28:32 +0000 (UTC) Received: by pacwe9 with SMTP id we9so168195095pac.1 for ; Sun, 22 Mar 2015 12:28:25 -0700 (PDT) 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:date :message-id:subject:from:to:cc:content-type; bh=sPLiwqU8fiE6a8EeQUCVGrzrIsRaCMUDMOTvav0Vb3o=; b=BcZE1dkB24htmYq2FgFuhNkeZJNIGDGn9HrMpQcNswX0J0Ddon46ytvDBhHQfvOFFg PGgjz3NrwCifXDZovNUmQQW4/1ioa5HqxBJGzhl/WjLQhUCWydK/dG/Vgtm+IIJBjf4d 7YZHYMFYTAoXsCAaoNqD9pNZsxOeUWz3Tp/2HmM03q7BHpF5qsQgEAcYqM4H+W5sLu5A 9K+lBYW7+MbJjlr5tHr9Nqe435aO0nTjl6yGRtewHbZ6mKWdIUge1/QUCPqp02VfMF9r p1LiIfNrbh0cm93+9m6Pow0rgDh64azUzy/DQ6MKMgPx6CPvP60b5Egs1pqzGBR5r/VJ M6OA== X-Gm-Message-State: ALoCoQkC3dSQad5/LieFYTowlfqQxgb6cJyiINdNS5VAV469xylZ1bGSGSi5QuJs1g4NUVNKCEIP MIME-Version: 1.0 X-Received: by 10.70.89.195 with SMTP id bq3mr164835705pdb.138.1427052505838; Sun, 22 Mar 2015 12:28:25 -0700 (PDT) Received: by 10.70.65.105 with HTTP; Sun, 22 Mar 2015 12:28:25 -0700 (PDT) Received: by 10.70.65.105 with HTTP; Sun, 22 Mar 2015 12:28:25 -0700 (PDT) In-Reply-To: References: <201503211501.t2LF1Kj8052521@svn.freebsd.org> <20150321210341.GC15857@lonesome.com> <20150321210810.GT2379@kib.kiev.ua> <20150321212416.GU2379@kib.kiev.ua> Date: Sun, 22 Mar 2015 12:28:25 -0700 Message-ID: Subject: Re: svn commit: r280323 - head/sys/kern From: Jos Backus To: svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: Konstantin Belousov , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 19:28:33 -0000 On Mar 22, 2015 5:11 AM, "Dmitry Morozovsky" wrote: > > On Sat, 21 Mar 2015, Konstantin Belousov wrote: > > > > > > > Somewhat modernize the SysV shm code: > > > > > > > > > > Is my understanding correct that postgres still uses shm? If so, > > > > > has someone benchmarked the speedup? > > > > > > > > Yes, some versions of Postgres still use SysV shm. > > > > > > To be clarified: IIUC, *all* contemporary versions of PostgreSQL do > > > use SHM for shatrd buffers (as PgSQL use process-per-connection model) > > > > No. Recent versions use mmaped shared region for buffers. > > Yes, starting from 9.3 main buffers are memory-mapped. SysV SHM and Semaphores > *are* still in use though. To expand on this a little bit: A small amount of SysV shared memory and semaphores are still used to manage safe and crash-proof access to the shared buffers between the postmaster and the client instances and other worker processes that need access to said buffers. My understanding from discussions on the PostgreSQL hackers list is that POSIX shared memory doesn't have the behavior needed to provide the same guarantees required. The change to use mmap()-ed memory was done to help people avoid having to change their SysV IPC resource limits, since these tend to have to be statically allocated, and are often too low to run PostgreSQL well or at all. This is to the best of my understanding. I'm not a PostgreSQL developer, so I could be wrong, in which case, please correct me. Jos > (mainly for search engines) > > Thanks for the clarification. > > -- > Sincerely, > D.Marck [DM5020, MCK-RIPE, DM3-RIPN] > [ FreeBSD committer: marck@FreeBSD.org ] > ------------------------------------------------------------------------ > *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** > ------------------------------------------------------------------------ > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org"