Table of Contents Previous Next


8 Performance Analysis and Tuning : 8.2 Infinite Cache : 8.2.2 Configuring the Infinite Cache Server

Modify the Advanced Server postgresql.conf file, enabling Infinite Cache, and specifying connection and compression settings.
The Infinite Cache configuration file is named edb-icache, and contains two parameters and their associated values:
To modify a parameter, open the edb-icache file (located in the /opt/edb/icache/etc directory) with your editor of choice, and modify the parameter values:
Use the PORT variable to specify the port where Infinite Cache will listen for connections from Advanced Server.
Use the CACHESIZE variable to specify the size of the cache (in MB).
The postgresql.conf file includes three configuration parameters that control the behavior of Infinite Cache. The postgresql.conf file is read each time you start the Advanced Server database server. To modify a parameter, open the postgresql.conf file (located in the $PGDATA directory) with your editor of choice, and edit the section of the configuration file shown below:
Lines that begin with a pound sign (#) are treated as comments; to enable a given parameter, remove the pound sign and specify a value for the parameter. When you've updated and saved the configuration file, restart the database server for the changes to take effect.
Use the edb_enable_icache parameter to enable or disable Infinite Cache. When edb_enable_icache is set to on, Infinite Cache is enabled; if the parameter is set to off, Infinite Cache is disabled.
If you set edb_enable_icache to on, you must also specify a list of cache servers by setting the edb_icache_servers parameter (described in the next section).
The default value of edb_enable_icache is off.
The edb_icache_servers parameter specifies a list of one or more servers with active edb-icache daemons. edb_icache_servers is a string value that takes the form of a comma-separated list of hostname:port pairs. You can specify each pair in any of the following forms:
If you do not specify a port number, Infinite Cache assumes that the cache server is listening at port 11211. This configuration parameter will take effect only if edb_enable_icache is set to on. Use the edb_icache_servers parameter to specify a maximum of 128 cache nodes.
The edb_icache_compression_level parameter controls the compression level that is applied to each page before storing it in the distributed Infinite Cache. This parameter must be an integer in the range 0 to 9.
A compression level of 0 disables compression; it uses no CPU time for compression, but requires more storage space and network resources to process.
A compression level of 9 invokes the maximum amount of compression; it increases the load on the CPU, but less data flows across the network, so network demand is reduced. Each page takes less room on the Infinite Cache server, so memory requirements are reduced.
A compression level of 5 or 6 is a reasonable compromise between the amount of compression received and the amount of CPU time invested.
By default, edb_icache_compression_level is set to 6.
When Advanced Server reads data from disk, it typically reads the data in 8K increments. If edb_icache_compression_level is set to 0, each time Advanced Server sends an 8K page to the Infinite Cache server that page is stored (uncompressed) in 8K of cache memory. If the edb_icache_compression_level parameter is set to 9, Advanced Server applies the maximum compression possible before sending it to the Infinite Cache server, so a page that previously took 8K of cached memory might take 2K of cached memory. Exact compression numbers are difficult to predict, as they are dependent on the nature of the data on each page.
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. By default, effective_io_concurrency is set to 1.
On Linux, the Infinite Cache service script is named edb-icache. The service script resides in the /etc/init.d directory. You can control the Infinite Cache service, or check the status of the service with the following command:
Where action specifies:
start to start the service.
stop to stop the service
restart to stop and then start the service.
status to return the status of the service.

8 Performance Analysis and Tuning : 8.2 Infinite Cache : 8.2.2 Configuring the Infinite Cache Server

Table of Contents Previous Next