Calculating Memory Requirements for the FOCUS Database Server

How to:

When ten or fewer users are working with two databases, each of which has several hundred fields, you need about a megabyte of storage to run the FOCUS Database Server. Generally speaking, the memory needed to run the FOCUS Database Server equals the sum of the size of the FOCUS Database Server code (620K) plus operating system overhead (approximately 250K), plus overhead for the database and the users.

Operating system overhead is approximately 250K, but depends on the size of the directory and on the number and size of the files being opened.


Top of page

x
Procedure: How to Calculate Database Overhead for Centrally Controlled Databases

Compute the database overhead for each centrally controlled database processed by the FOCUS Database Server using the following formula:

(s * 48) + (f * 72) + 200

where:

s

Is the number of segments in the database.

f

Is the number of fields in the database.

Only HLI and MODIFY/Maintain create user overhead. Calculate user overhead with the following steps:

  1. Estimate the maximum number of users who might use the FOCUS Database Server simultaneously.
  2. For each database, sum the field lengths as defined by the USAGE attribute in the Master Files. Integer and floating-point fields are four bytes long, packed fields can be eight or 16 bytes long, and double-precision fields are eight bytes. Include in this sum the lengths of cross-reference fields (that is, fields in segment types KM, KU, KL, and KLU). Do not include lengths of fields in databases that you intend to join to by using the JOIN command.
  3. HLI usage affects computation of user overhead:
    • If no client is using HLI, take the maximum total field length and add 3200. Then multiply that by the number of users. The result is the user overhead.
    • If at least one client is using HLI, add the total field lengths for all files that could be opened concurrently by a single user, plus 3200 bytes per file, plus four bytes for each field specified by the HLI SHO command. Then multiply the sum by the number of users to obtain the total user overhead.


Example: Calculating Database Overhead and Total Field Length

Consider the following Master File:

FILE=CARDATA,   SUFFIX=FOC,$ 
SEGNAME=CARSEG, SEGTYPE=S1,$ 
FIELDNAME=CAR          ,ALIAS=AUTO   ,FORMAT=A16 ,$ 
FIELDNAME=MANUFACTURER ,ALIAS=MAKE   ,FORMAT=A20 ,$
SEGNAME=MODELSEG, SEGTYPE=Sl, PARENT=CARSEG,$
FIELDNAME=MODEL        ,ALIAS=MODEL  ,FORMAT=A22 ,$
FIELDNAME=SEATS        ,ALIAS=SEAT   ,FORMAT=I4  ,$
FIELDNAME=DEALER_COST  ,ALIAS=DCOST  ,FORMAT=D7  ,$
FIELDNAME=RETAIL_COST  ,ALIAS=RCOST  ,FORMAT=D7  ,$
FIELDNAME=SALES        ,ALIAS=UNITS  ,FORMAT=I6  ,$

This database has two segments and seven fields. The database overhead is (2x48) + (7x72) + 200 = 800 bytes.

The total field length is 16 + 20 + 22 + 4 + 8 + 8 + 4 = 82 bytes

The next example shows how to calculate minimum memory requirements for a FOCUS Database Server. Assume, for example, that a maximum of 20 data entry clerks can be on the FOCUS Database Server at one time and that the staff uses two databases:

The FOCUS Database Server code takes 620K. The system overhead is 250K. The total database overhead is 3500 bytes or roughly 4K.



Example: Calculating Memory Requirements When HLI Is Not in Use

If no client is using HLI, choose the database with the larger total field lengths (750 bytes for the second database). Adding 3200 bytes to this number gives 3950 bytes, or roughly 4K. Assuming, for example, that a maximum of 20 data entry clerks can be on a FOCUS Database Server at the same time, the user overhead is:

4K x 20 = 80K

Since Database Server memory requirements equal the sum of the Database Server code size, plus system overhead, plus database overhead, plus user overhead, the minimum amount of memory required is:

620K + 250K + 4K + 80K = 954K


Example: Calculating Memory Requirements When HLI Is in Use

If at least one client is using HLI, you add the total field lengths of the two databases (450 + 750), which gives 1200 bytes. Since there are two databases, add 2 x 3200 or 6400 bytes. Suppose that there were five fields of four bytes each listed in any SHO command. Their contribution would be 20 bytes. Adding 1200 plus 6400 plus 20 yields 7620 bytes. Assuming, for example, that a maximum of 20 data entry clerks can be on the Database Server at a time, the user overhead is:

7620 x 20 = 152,040 bytes, or about 152K

The Database Server needs the sum of the server code size, plus system overhead, database overhead, and user overhead, so the minimum amount of memory needed is:

620K + 250K + 4K + 152K = 1026K

Improving Performance provides suggestions for improving SU performance.


Information Builders