Home    |    Concepts   |   API   |   Samples
Concepts > Logfiles > Basic Principles
Log file pooling and caching

Pooling

There are times when users might create large numbers of log file tables. Even if the number of tables is small, it may not be desirable to be constantly creating and dropping tables on every connection. To alleviate this problem, once a gsrvr creates a stand-alone log file, it holds onto it even when it is no longer used. In essence, the gsrvr creates a pool of these stand-alone log files. In addition to a gsrvr's pool of stand-alone log files, the database administrator (DBA) may also allow for a pool of session-based log files owned by the ArcSDE administrator. For example, the DBA may specify a pool of 50 session log files. When a gsrvr needs a log file, it will use any available session log file from the pool before creating its own log files. This avoids several table CREATE/DROP statements while retaining the advantages of session and stand-alone tables.

Note: Log files from the session pool can be used by gsrvrs as a true session log file or as a stand-alone log file.

The pool of session log files helps eliminate the need for all users to have CREATE TABLE permission. You can setup a large enough pool to service all users. For example, if you know that there are at most 50 users connected, you could set LOGFILEPOOLSIZE to 50 and MAXSTANDALONELOGS to zero. Then each gsrvr will use only one log file, and it will be from the session pool. Or, if you want some of the advantages of stand-alone log files, you could set LOGFILEPOOLSIZE to 150 and MAXSTANDALONELOGS to 2 (50 users * (1 session + 2 standalone) = 150 in the pool).

Note: If the pool is sized too small, and users do not have CREATE TABLE permissions, their processes will fail when the pool is full and they need a log file.

When using pooling, the gsrvr does not automatically try to create log file tables each time it starts.

ArcSDE creates the following tables to implement pooling of log files:

  • SDE_logfile_pool—Maintains table allocation for each session
  • SDE_logpool_n—Stores selection ID and OBJECTID of selection

The log file pool is shared among several connections. The LOGFILEPOOLSIZE parameter configures the number of tables in the pool.

Caching

The ArcSDE server maintains a cache of session and stand-alone log files. This is safe to do since only the gsrvr has access to these log files. This cache reduces the number of queries sent to the log files table to get a log file definition.

When the server gets a request to fetch a particular log file, it first searches its cache. If it is not found there, it will query the log files table.

feedback | privacy | legal