Re: [HACKERS] system cache and buffer cache
On Tue, 2006-09-19 at 14:59 +0100, Heikki Linnakangas wrote: Praveen Kumar N wrote: how about system cache? Can we control the size of system cache? It's in backend-private memory. I don't remember how it's sized. It's fixed size: syscache caches a predefined set of catalog info. -- Simon Riggs EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 6: explain analyze is your friend
Re: [HACKERS] system cache and buffer cache
Praveen Kumar N wrote: Hi, can anybody explain me what is the difference between system cache and buffer cache? I found that keywords in PostgreSql FAQ http://www.postgresql.org/docs/faqs.FAQ_DEV.html#item2.1 System cache is a per-row cache of system catalog tables. It's used to speed up lookup of things like function names. It's implemented in src/backend/utils/cache/syscache.c Buffer cache is the cache managed by the buffer manager, that caches any blocks from any relation used in the system. All access to relations go through the buffer cache, using ReadBuffer/ReleaseBuffer (etc.) calls. It's implemented in src/backend/storage/buffer/bufmgr.c -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [HACKERS] system cache and buffer cache
Buffer cache is implemented using bufferpool right(I mean in the main memory).how about system cache? Can we control the size of system cache? On Tue, 19 Sep 2006, Heikki Linnakangas wrote: System cache is a per-row cache of system catalog tables. It's used to speed up lookup of things like function names. It's implemented in src/backend/utils/cache/syscache.c Buffer cache is the cache managed by the buffer manager, that caches any blocks from any relation used in the system. All access to relations go through the buffer cache, using ReadBuffer/ReleaseBuffer (etc.) calls. It's implemented in src/backend/storage/buffer/bufmgr.c -- N Praveen Kumar Btech-IV CSE IIIT,Hyd AP,India Imagination is more important than knowledge... --Albert Einstein ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [HACKERS] system cache and buffer cache
Praveen Kumar N wrote: Buffer cache is implemented using bufferpool right(I mean in the main memory). Yes. It's in shared memory, size is controlled by the shared_buffers configuration parameter. how about system cache? Can we control the size of system cache? It's in backend-private memory. I don't remember how it's sized. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [HACKERS] system cache and buffer cache
Praveen Kumar N wrote: Hi, can anybody explain me what is the difference between system cache and buffer cache? I found that keywords in PostgreSql FAQ http://www.postgresql.org/docs/faqs.FAQ_DEV.html#item2.1 Another important cache is the relation cache, relcache for short, which is also stored in local memory. One important point about these (relcache, syscache, catcaches = catalog caches) is that they are invalidated using the sinval system, which passes messages from one backend to all others via a queue in shared memory. The buffer cache needs no such thing, precisely because it lives in shared memory. But it needs to be protected by locks. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org