8.2 Infinite Cache

Table of Contents Previous Next


8 Performance Analysis and Tuning : 8.2 Infinite Cache

Note: Infinite Cache has been deprecated and may be removed in a future release. Please contact your EnterpriseDB Account Manager or mailto:sales@enterprisedb.com for more information.
Advanced Server tries very hard to minimize disk I/O by keeping frequently used data in memory. When the first server process starts, it creates an in-memory data structure known as the buffer cache. The buffer cache is organized as a collection of 8K (8192 byte) pages: each page in the buffer cache corresponds to a page in some table or index. The buffer cache is shared between all processes servicing a given database.
When you select a row from a table, Advanced Server reads the page that contains the row into the shared buffer cache. If there isn't enough free space in the cache, Advanced Server evicts some other page from the cache. If Advanced Server evicts a page that has been modified, that data is written back out to disk; otherwise, it is simply discarded. Index pages are cached in the shared buffer cache as well.
::EDB graphics:IC1.jpg
With Infinite Cache properly configured, Advanced Server will dedicate a portion of the memory installed on each cache server as a secondary memory cache. When a client application sends a query to the server, the server first searches the shared buffer cache for the required data; if the requested data is not found in the cache, the server searches for the necessary page in one of the cache servers.
::EDB graphics:IC2.jpg
You can add or remove cache servers without restarting the database server by adding or deleting cache nodes from the list defined in the edb_icache_servers configuration parameter. For more information about changing the configuration parameter, see Section 8.2.2.2.
(existing_nodes * 100) / (existing_nodes + new_nodes)
When you change the cache server configuration (by adding or removing cache servers), the portion of the cache configuration that is preserved is not re-written unless the cache is completely re-warmed using the edb_icache_warm() function or edb_icache_warm utility. If you do not re-warm the cache servers, new cache servers will accrue cache data as queries are performed on the server.
Without Infinite Cache, Advanced Server will read each page from disk as an 8K chunk; when a page resides in the shared buffer cache, it consumes 8K of RAM. With Infinite Cache, Postgres can compress each page before sending it to a cache server. A compressed page can take significantly less room in the secondary cache, making more space available for other data and effectively increasing the size of the cache. A compressed page consumes less network bandwidth as well, decreasing the amount of time required to retrieve a page from the secondary cache.
Please Note: Infinite Cache and the effective_io_concurrency parameter can potentially interfere with each other. You should disable asynchronous I/O requests (by setting the value of effective_io_concurrency to 0 in the postgresql.conf file) if you enable the Infinite Cache feature.

8 Performance Analysis and Tuning : 8.2 Infinite Cache

Table of Contents Previous Next