4.13 Managing Memory to Improve Performance

GeoRaster has its own buffer system to read and write raster (LOB) data. This system is separate from the Oracle Database buffer system. The following table lists parameters that can be used to configure the GeoRaster buffer system, which is used for all I/O operations on GeoRaster objects.

Table 4-1 GeoRaster Buffering Parameters

Parameter Name Description Default Value
MemMaxSize Upper limit size of the memory that can be used for GeoRaster buffering for each GeoRaster object. 17 MB
MemReadBlockSize Internal data block size for read-only operations for caching raster data. 32 KB
MemWriteBlockSize Internal data block size for read/write operations for caching raster data. 64 KB

You can get and set the values of these parameters using the following PL/SQL subprograms:

Because the parameters are set using PL/SQL, their values are defined for the duration of the database session. For any subsequent sessions, if you want to use any nondefault values for any of the parameters, you must set them using the appropriate procedures.

In general, using large values for the parameters improves performance for GeoRaster I/O operations. The following are some specific considerations and guidelines.

  • Allocating more memory (increasing MemMaxSize) reduces disk access; and ideally, allocating big enough memory to hold an entire GeoRaster object will dramatically improve performance. However, Oracle Database allows multiple users and concurrent access, and so you should aim for balanced memory allocation in such an environment.

  • Increasing the read block size (increasing MemReadBlockSize) reduces the number of OCI LOB read operations, thus improving performance. However, due to different interleaving between source and target GeoRaster objects in an operation, if the MemReadBlockSize value cannot hold the entire GeoRaster object, the read block size might be too large and cause frequent read block page-in and page-out operations, thus degrading performance.
  • Almost all GeoRaster operations are write-driven, so that a larger write block size (increasing MemWriteBlockSize) will reduce number of OCI LOB write operations and thus improve performance.