From: Alan Stange <stange@rentec.com>
To: pgsql-performance@postgresql.org
Subject: BG writer question?
Date: Thu, 11 Aug 2005 11:25:27 -0400
Message-ID: <42FB6DE7.7060107@rentec.com> (raw)
Hello all,
I just was running strace in the writer process and I noticed this pattern:
select(0, NULL, NULL, NULL, {0, 200000}) = 0 (Timeout)
getppid() = 4240
time(NULL) = 1123773324
mmap2(NULL, 528384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0x81000) = 0x69ea3000
semop(1409034, 0xffffc0bc, 1) = 0
<...seeks and writes...>
munmap(0x69ea3000, 528384) = 0
select(0, NULL, NULL, NULL, {0, 200000}) = 0 (Timeout)
getppid() = 4240
time(NULL) = 1123773324
mmap2(NULL, 528384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0x81000) = 0x69ea3000
semop(1605648, 0xffffc0bc, 1) = 0
<...seeks and writes...>
munmap(0x69ea3000, 528384) = 0
select(0, NULL, NULL, NULL, {0, 200000}) = 0 (Timeout)
why mmap and munmap each time? mmap and munmap are fairly expensive
operations (on some systems), especially on multi cpu machines. munmap
in particular generally needs to issue cross calls to the other cpus to
ensure any page mappings are invalidated.
Just curious.
Thanks!
-- Alan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: stange@rentec.com
Subject: Re: BG writer question?
In-Reply-To: <42FB6DE7.7060107@rentec.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox