From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | James Rogers <jrogers(at)neopolitan(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Tablespaces |
Date: | 2004-02-26 22:42:47 |
Message-ID: | 15041.1077835367@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-hackers-win32 |
James Rogers <jrogers(at)neopolitan(dot)com> writes:
> With the implementation of much smarter and more adaptive cache
> replacement algorithm i.e. ARC, I would expect the benefit of using the
> kernel file system cache to diminish significantly. It appears to me,
> and I could be wrong, that the reason Postgres has depended on the
> kernel file system cache isn't that this is obviously better in some
> absolute sense (though it might be depending on the deployment
> scenario), but that the original cache replacement algorithm in Postgres
> was sufficiently poor that the better cache replacement algorithms in
> the kernel cache more than offset any sub-optimality that might result
> from doing so.
The question of optimality of replacement algorithm is only one of the
arguments for using a small buffer cache. IMHO a considerably stronger
argument is that the kernel's memory management is more flexible: it can
use that memory for either disk cache or program workspace, and it can
change the allocation on-the-fly as load demands. If you dedicate most
of RAM to Postgres buffers then you are likely to be wasting RAM or
swapping heavily. Possibly both :-(
Another gotcha is that unless the OS allows you to lock shared memory
into RAM, the shared buffers themselves could get swapped out, which is
a no-win scenario by any measure. Keeping the shared buffer arena small
helps prevent that by ensuring all the buffers are "hot".
Of course, this is all speculation until we get some real-world
experience with ARC. But I don't expect it to be a magic bullet.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2004-02-26 22:45:05 | Re: [HACKERS] Collaboration Tool Proposal |
Previous Message | Tom Lane | 2004-02-26 22:29:38 | Re: [HACKERS] Collaboration Tool Proposal |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2004-02-26 22:45:05 | Re: [HACKERS] Collaboration Tool Proposal |
Previous Message | Tom Lane | 2004-02-26 22:29:38 | Re: [HACKERS] Collaboration Tool Proposal |