From owner-svn-src-head@FreeBSD.ORG Sun Mar 22 19:35:55 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E782AFC1 for ; Sun, 22 Mar 2015 19:35:55 +0000 (UTC) Received: from mail-pd0-f178.google.com (mail-pd0-f178.google.com [209.85.192.178]) (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 B820DAD4 for ; Sun, 22 Mar 2015 19:35:55 +0000 (UTC) Received: by pdnc3 with SMTP id c3so164907913pdn.0 for ; Sun, 22 Mar 2015 12:35:55 -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=VtGoVaJeENPH4Esr5bXzJQjOrwEYFG57WI+re5kyto6NI1mKhCo2ILklbuZaHCLo9/ Du0w46r+nMfdYj+9P9BkgNpPP6EvJ3YgStBz8zpBuR3sTyJ18UFHsDZ2FXXoQRUaYXkd twk6k4HWAPWAjZ7jKsWjGP0JxDkvE1wmlHvbCEelqOGgV9RUOJVntQUNaaGBgQgRjbX5 fx2qlxFRQOWjxKenfnNNz/M1oWf0WHmoeCppbH0Z2gljPvsbm7AKQU9pTMFzETYPBPa/ n65ewvx7DO+CfMM7IncZ2m7azqtGrQSK7SLQHhhpp2qlm2yrqKrX00IB3gkQf7bQudAv +62g== X-Gm-Message-State: ALoCoQkxyN4PG7/wybNh8FQ1q49Yd24qy/MPeNhKJY+qgOR+g7pCvR2Lt4fZrtN1ISLlhusK6kcO 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 19:35:56 -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"