From owner-freebsd-questions@FreeBSD.ORG Fri Nov 9 08:28:20 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7FF49AEA for ; Fri, 9 Nov 2012 08:28:20 +0000 (UTC) (envelope-from brfr@metrico.lu) Received: from design18.letzebuerg.net (design18.letzebuerg.net [5.9.44.110]) by mx1.freebsd.org (Postfix) with ESMTP id 36E248FC18 for ; Fri, 9 Nov 2012 08:28:19 +0000 (UTC) Received: from [88.207.161.146] (port=50655 helo=[192.168.0.3]) by design18.letzebuerg.net with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.80) (envelope-from ) id 1TWjwf-003V5X-J6 for freebsd-questions@freebsd.org; Fri, 09 Nov 2012 09:28:10 +0100 Message-ID: <509CBE9A.5020007@metrico.lu> Date: Fri, 09 Nov 2012 09:28:10 +0100 From: Frank Broniewski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121028 Thunderbird/16.0.2 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Postgresql related memory question Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - design18.letzebuerg.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - metrico.lu X-Get-Message-Sender-Via: design18.letzebuerg.net: authenticated_id: brfr@metrico.lu X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Nov 2012 08:28:20 -0000 Hi, I recently had a discussion of PostgreSQLs memory usage on FreeBSD, notably the display of the different memory types in top, on the PostgreSQL mailing list [1]. My server has 32GB ram, of which approx. 8GB vanish from tops display after a while. My question was wether there is a memory problem on FreeBSD or if top is not capable of dealing well with PostgreSQLs memory handling, eg. the shared_buffers. We used a perl script [2] to get a better understanding of the current memory usage on FreeBSD and a line from the scripts output caught my eye: > mem_gap_vm: + 8812892160 ( 8404MB) [ 26%] Memory gap: UNKNOWN I don't have a good understanding of the different types of system memory, so the question is, in relation with PostgreSQL, if the mem_gap_vm value can be considered normal or if it is a sign of memory leak. Since this question is more of a FreeBSD question, we decided to move the discussion here in order to get more insight on the system internals :-) This value equals more or less the shared buffers (shared_buffers=8GB) setting of PostgreSQL and is stable, which means, it doesn't change anymore after reaching its peak value. I did post already some system configuration information in the thread on the PostgreSQL list, but I am happy to provide all the information necessary to shed some light on this matter. Many thanks, Frank [1] http://postgresql.1045698.n5.nabble.com/Memory-issue-on-FreeBSD-td5730651.html [2] http://www.cyberciti.biz/faq/freebsd-command-to-get-ram-information/ -- Frank BRONIEWSKI METRICO s.à r.l. géomètres technologies d'information géographique rue des Romains 36 L-5433 NIEDERDONVEN tél.: +352 26 74 94 - 28 fax.: +352 26 74 94 99 http://www.metrico.lu