Re: [GENERAL] Multiple buffer cache?

2010-02-11 Thread Alexei Vladishev
Bret, And then, even if the support is there, you'd need to outline exactly how you're planning on pushing this button. Specifically, what's your usage pattern that would make this a win for you? Let me explain. I have a very busy application generating thousands of SQLs per second. The

Re: [GENERAL] Multiple buffer cache?

2010-02-11 Thread Alexei Vladishev
Greg, Alexei Vladishev wrote: Is there a way of configuring PostgreSQL so that one specific table would use, say, 4GB of buffer cache while other tables would use the rest? It sounds like you're looking for what other databases call "pinning". It's not supported in PostgreSQL right now, an

Re: [GENERAL] Multiple buffer cache?

2010-02-11 Thread Alexei Vladishev
Greg, Let's look at this from an application developer perspective. Suppose my application has a few hundreds of tables. I know _very_well_ how the tables are used. I'd like to tune PostgreSQL so that it would respect how the application works in order to get best possible performance. My da

Re: [GENERAL] Multiple buffer cache?

2010-02-08 Thread Greg Smith
Alvaro Herrera wrote: This should be easy to test, no? Just set some variable while running latency-critical queries that makes PinBuffer increment usage_count by more than one when pinning a buffer. Such a buffer would have its usage count typically higher than a buffer only used for regular q

Re: [GENERAL] Multiple buffer cache?

2010-02-08 Thread Alvaro Herrera
Greg Stark wrote: > I doubt pinning buffers ever improve system on any halfway modern system. It > will often *look* like it has improved performance because it improves the > performance of the queries you're looking at -- but at the expense of > slowing down everything else. > > There is a use c

Re: [GENERAL] Multiple buffer cache?

2010-02-07 Thread Greg Stark
I doubt pinning buffers ever improve system on any halfway modern system. It will often *look* like it has improved performance because it improves the performance of the queries you're looking at -- but at the expense of slowing down everything else. There is a use case it would be useful for tho

Re: [GENERAL] Multiple buffer cache?

2010-02-06 Thread Tom Lane
Greg Smith writes: > ... Part of the reason this feature > hasn't been been perceived as more valuable is because just letting the > two cache levels involved here sort out what's really valuable or not > can often outperform what an application developer thinks the optimal > configuration wi

Re: [GENERAL] Multiple buffer cache?

2010-02-06 Thread Greg Smith
Bret S. Lambert wrote: On Sat, Feb 06, 2010 at 02:44:32PM +0100, C?dric Villemain wrote: I am working on pgfincore which allow in some way to prepare buffer cache. You need pg > 8.4 and linux (probably working with bsd too) Why do something with a non-portable interface? Most OSes supp

Re: [GENERAL] Multiple buffer cache?

2010-02-06 Thread Greg Smith
Alexei Vladishev wrote: Is there a way of configuring PostgreSQL so that one specific table would use, say, 4GB of buffer cache while other tables would use the rest? It sounds like you're looking for what other databases call "pinning". It's not supported in PostgreSQL right now, and as far

Re: [GENERAL] Multiple buffer cache?

2010-02-06 Thread Alexei Vladishev
Bret, Thank you for your response! Greetings, Is there a way of configuring PostgreSQL so that one specific table would use, say, 4GB of buffer cache while other tables would use the rest? I would like to keep the table and its indexes always in "hot" state, so that other queries won't pollut

Re: [GENERAL] Multiple buffer cache?

2010-02-06 Thread Cédric Villemain
; Sent: February-06-10 4:50 AM > To: Alexei Vladishev > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Multiple buffer cache? > > On Fri, Feb 05, 2010 at 11:41:13PM +0200, Alexei Vladishev wrote: >> Greetings, >> >> Is there a way of configuring PostgreSQL

Re: [GENERAL] Multiple buffer cache?

2010-02-06 Thread Cédric Villemain
2010/2/6 Bret S. Lambert : > On Sat, Feb 06, 2010 at 02:44:32PM +0100, C?dric Villemain wrote: >> 2010/2/6 Bret S. Lambert : >> > On Fri, Feb 05, 2010 at 11:41:13PM +0200, Alexei Vladishev wrote: >> >> Greetings, >> >> >> >> Is there a way of configuring PostgreSQL so that one specific table would

Re: [GENERAL] Multiple buffer cache?

2010-02-06 Thread BillR
sql.org Subject: Re: [GENERAL] Multiple buffer cache? On Fri, Feb 05, 2010 at 11:41:13PM +0200, Alexei Vladishev wrote: > Greetings, > > Is there a way of configuring PostgreSQL so that one specific table would > use, say, 4GB of buffer cache while other tables would use the rest? &g

Re: [GENERAL] Multiple buffer cache?

2010-02-06 Thread Bret S. Lambert
On Sat, Feb 06, 2010 at 02:44:32PM +0100, C?dric Villemain wrote: > 2010/2/6 Bret S. Lambert : > > On Fri, Feb 05, 2010 at 11:41:13PM +0200, Alexei Vladishev wrote: > >> Greetings, > >> > >> Is there a way of configuring PostgreSQL so that one specific table would > >> use, say, 4GB of buffer cache

Re: [GENERAL] Multiple buffer cache?

2010-02-06 Thread Bret S. Lambert
On Sat, Feb 06, 2010 at 03:46:58PM +0200, Alexei Vladishev wrote: > Bret, > > Thank you for your response! > > >>Greetings, > >> > >>Is there a way of configuring PostgreSQL so that one specific table would > >>use, say, 4GB of buffer cache while other tables would use the rest? > >> > >>I would

Re: [GENERAL] Multiple buffer cache?

2010-02-06 Thread Cédric Villemain
2010/2/6 Bret S. Lambert : > On Fri, Feb 05, 2010 at 11:41:13PM +0200, Alexei Vladishev wrote: >> Greetings, >> >> Is there a way of configuring PostgreSQL so that one specific table would >> use, say, 4GB of buffer cache while other tables would use the rest? >> >> I would like to keep the table a

Re: [GENERAL] Multiple buffer cache?

2010-02-06 Thread Bret S. Lambert
On Fri, Feb 05, 2010 at 11:41:13PM +0200, Alexei Vladishev wrote: > Greetings, > > Is there a way of configuring PostgreSQL so that one specific table would > use, say, 4GB of buffer cache while other tables would use the rest? > > I would like to keep the table and its indexes always in "hot" >

[GENERAL] Multiple buffer cache?

2010-02-06 Thread Alexei Vladishev
Greetings, Is there a way of configuring PostgreSQL so that one specific table would use, say, 4GB of buffer cache while other tables would use the rest? I would like to keep the table and its indexes always in "hot" state, so that other queries won't pollute this part of the buffer cache. It