Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Nov 2012 09:28:10 +0100
From:      Frank Broniewski <>
Subject:   Postgresql related memory question
Message-ID:  <>

Next in thread | Raw E-Mail | Index | Archive | Help

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,



METRICO s.à r.l.
technologies d'information géographique
rue des Romains 36

tél.: +352 26 74 94 - 28
fax.: +352 26 74 94 99

Want to link to this message? Use this URL: <>