Re: BUG #4575: All page cache in shared_buffers pinned (duplicated by OS, always)

From: Scott Carey <scott(at)richrelevance(dot)com>
To: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #4575: All page cache in shared_buffers pinned (duplicated by OS, always)
Date: 2008-12-11 16:39:21
Message-ID: BDFBB77C9E07BE4A984DAAE981D19F961ACA17DA02@EXVMBX018-1.exch018.msoutlookonline.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Ok, I'll double check to validate that there is true duplication.

If shared memory cannot be swapped, and shows up in the page cache list (which would be odd, but ok, since shared mem is not page cache it is application memory), then only those pages (the actual shared_buffers) would not be swappable, not a 'clone' of those buffers in the os page cache.

I certainly don't care if the shared memory isn't pageable, I do care if a clone of that memory is also not pageable.

________________________________________
From: Pavan Deolasee [pavan(dot)deolasee(at)gmail(dot)com]
Sent: Thursday, December 11, 2008 12:35 AM
To: Scott Carey
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #4575: All page cache in shared_buffers pinned (duplicated by OS, always)

On Thu, Dec 11, 2008 at 5:37 AM, Scott Carey <scott(at)richrelevance(dot)com> wrote:
>
>
> Run top, and note the largest value of the "SHR" column on all postgres
> processes. Now execute the os cache eviction. Check the remaining cached
> memory.
> Note that it is now larger than the baseline by essentially the exact size
> of the postgres shared memory.
>

Isn't the shared memory on Linux non-swappable, unlike Solaris where
you have an option to make is swappable ? As and when shared memory
pages are accessed, they are allocated and can not be swapped out. I
don't know if these pages are counted as part of the OS cache, but
assuming they are, I don't see any problem with the above observation.

May be you can try to write a C program which creates, attaches and
accesses every page of the shared memory and check if you see the same
behavior.

Thanks,
Pavan

--
Pavan Deolasee
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Ahmed Shinwari 2008-12-11 17:09:40 ECPG Preprocessor throws Syntax Error [Devel Repository]
Previous Message Scott Carey 2008-12-11 16:31:21 Re: BUG #4575: All page cache in shared_buffers pinned (duplicated by OS, always)