From: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, amul sul <sul_amul(at)yahoo(dot)co(dot)in>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Server crash due to SIGBUS(Bus Error) when trying to access the memory created using dsm_create(). |
Date: | 2016-08-23 00:18:09 |
Message-ID: | CAEepm=27q=VLg5Mh76a1NfzK=9Xi1jnrpYm5VQNbQQJomwhU4A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Aug 23, 2016 at 8:41 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> We could test to see how much it slows things down. But it
> may be worth paying the cost even if it ends up being kinda expensive.
Here are some numbers from a Xeon E7-8830 @ 2.13GHz running Linux 3.10
running the attached program. It's fairly noisy and I didn't run
super long tests with many repeats, but the general theme is visible.
If you're actually going to USE the memory, it's only a small extra
cost to have reserved seats. But if there's a strong chance you'll
never access most of the memory, you might call it expensive.
Segment size 1MB:
base = shm_open + ftruncate + mmap + munmap + close = 5us
base + fallocate = 38us
base + memset = 332us
base + fallocate + memset = 346us
Segment size 1GB:
base = shm_open + ftruncate + mmap + munmap + close = 10032us
base + fallocate = 30774us
base + memset = 602925us
base + fallocate + memset = 655433us
--
Thomas Munro
http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
alloc_test.c | text/x-csrc | 1.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2016-08-23 00:20:31 | Re: Why --backup-and-modify-in-place in perltidy config? |
Previous Message | Craig Ringer | 2016-08-22 23:39:20 | Re: Logical decoding of sequence advances, part II |