isutl -ex

Extend freelist in an ISAM file

WSupported on Windows
USupported on Unix

 

NSupported in Synergy .NET
isutl -ex percent% [-mlevel#] filename[ ...] 

or

isutl -ex bucket:count[-mlevel#] filename[ ...]

percent%

The percentage of existing in-use segments on which to calculate the freelist extension, followed by a “%” sign.

bucket

Either the freelist bucket number or 0 for the index freelist.

count

The number of freelist segments.

-mlevel#

(optional) Specify a message level that defines the amount of information displayed during an operation, where level is one of the following values:

0 = No output is generated. All errors generated are returned in the form of an exit value.

1 = Only errors and necessary output are displayed. (default)

2 = Process information is displayed, in addition to errors and necessary output.

filename

The name of the ISAM file(s) you want to extend. The default extension is .ism.

Isutl -ex extends the freelist in an ISAM file. It has two forms:

Isutl -ex percent% scans the data file to determine the number of in-use and free segments. The number of freelist segments added is calculated based on the specified percentage of existing in-use segments. Any buckets with no segments in use or with freelist counts that equal or exceed the specified freelist percentage are not extended. This command helps to limit the number of file extents (fragments) that accumulate in files larger than 100 GB when many small records are stored over a period of time. Excessive file extents on Windows may result in Windows System Error 665. Use of this command during regular file maintenance periods is meant to avoid these excesses on extremely large files.

No locking occurs during the data file scan, and only brief tree locks are applied when linking in the new freelists, so other running processes accessing the same file will not be blocked during this operation.

Isutl -ex bucket:count scans the specified bucket freelist to determine the number of existing free segments to add and then extends the file by the necessary amount. Buckets containing the same number of free segments or more than the specified count are not extended. However, unlike the percent% form, empty buckets without any in-use segments, including empty files, can also be pre-extended using this command.

There is no limit to the magnitude or decimal precision of the specified percentage; however, the amount the file can be expanded is limited to a maximum of 25 percent of the available disk space on the device where the file resides. If the amount of available space cannot be determined, a maximum limit of 1 GB is enforced.

Using the default messaging level, the total number of buckets and total number of free segments added is displayed on completion, like this:

7 buckets extended 9628 free data segments added
48 free index blocks added
Note

Isutl -ro will clear the freelist, so to maintain a percentage free, you will need to run isutl -ex following isutl -ro.

The following command will expand both the data and index freelists in myfile to 1 percent. That means the freelist for all buckets in the data file with in-use segments will be filled to 1 percent.

isutl -ex 1% myfile

For example, if there are 10,000,000 in use segments and 1,000 free segments in bucket #9, the freelist for that bucket will be expanded by 99,000, making the total free 100,000 (under the #free column) for bucket #9. If bucket #10 has 10 in use segments and no free segments, only 1 free segment is added. And if bucket #11 has 2,000 in use segments and 20 free segments, no free segments are added, because the freelist for that bucket is already at or above 1 percent—and so on for each bucket with in-use segments. With compressed records, you can’t predict which buckets will be used more frequently, but isutl -b can be used to monitor it over time.

The following example shows a typical file that is best suited to using -ex. (Also see Examples for isutl -b.)

By extending the freelists by just 1.5%, contiguous free space is allocated with only a single file extension.

isutl -ex 1.5% conhist
36 buckets extended 509784 free data segments added
2651 free index blocks added

By including -m2, the full fractional freelist percentage is displayed.

isutl -bfm2 conhist
Scanning data file
Scanning data freelist

Bucket Allocation:
      slen      #inuse        %free       #free       lhead
1:      16           0            0           0
2:      24           0            0           0
3:      32           0            0           0
4:      40           0            0           0
5:      48           0            0           0
6:      56           0            0           0
7:      64           0            0           0
8:      72           0            0           0
9:      80           0            0           0
10:     88           0            0           0
11:     96           0            0           0
12:    104           0            0           0
13:    112           0            0           0
14:    120           0            0           0
15:    128           0            0           0
16:    136           0            0           0
17:    144           1          100           1       0x202bafaa8
18:    152          13      7.69231           1       0x202bafb38
19:    160        2047      1.51441          31       0x202bafbd0
20:    168       24219      1.50295         364       0x202bb0f30
21:    176       47077      1.50179         707       0x202bbfe10
22:    184      121414      1.50065        1822       0x202bde420
23:    192      302983      1.50008        4545       0x202c301b0
24:    200      672743      1.50013       10092       0x202d05270
25:    208      631307      1.50006        9470       0x202ef1ed0
26:    216     1613821      1.50004       24208       0x2030d2d30
27:    224     1530521      1.50001       22958       0x2035cf6b0
28:    232     3577469      1.50003       53663       0x203ab6ef0
29:    240     3530647      1.50001       52960       0x204696708
30:    248     3924051      1.50001       58861       0x2052b5908
31:    256     3925278      1.50002       58880       0x2060a16a0
32:    264     3701500      1.50001       55523       0x206f016a0
33:    272     3466741      1.50003       52002       0x207cfc0b8
34:    280     2540525      1.50000       38108       0x208a794d8
35:    288     1901455      1.50001       28522       0x2094a6578
36:    296     1277661      1.50001       19165       0x209c7bcb8
37:    304      616274      1.50014        9245       0x20a1e4c40
38:    312      266854      1.50007        4003       0x20a492eb0
39:    320      132741      1.50067        1992       0x20a5c3d58
40:    328       77975      1.50048        1170       0x20a65f758
41:    336       48834      1.50100         733       0x20a6bd268
42:    344       27579      1.50114         414       0x20a6f9478
43:    352       13282      1.50580         200       0x20a71c0c8
44:    360        5477      1.51543          83       0x20a72d3c8
45:    368        2280      1.53509          35       0x20a734880
46:    376         899      1.55729          14       0x20a737ad0
47:    384         350      1.71429           6       0x20a738f60
48:    392         127      1.57480           2       0x20a739860
49:    400          40      2.50000           1       0x20a739b70
50:    408          18      5.55556           1       0x20a739d00
51:    416           4           25           1       0x20a739e98
52:    424           2           50           1       0x20a73a038

53:    432           0            0           0
54:    440           0            0           0
55:    448           0            0           0
56:    456           0            0           0
.
.
.
130:  1004           0            0           0
131:  1010           0            0           0
Unusable: 0 segments, 0 bytes
Segment bytes: total = 8765276640, unused = 119620206 (1%)
Freelist use:
  509784 data segments (1.5% free)
  2651 index blocks (1.5% free)
Index file fragments: 41492
Data file fragments: 41623
Elapsed time: 11.469 seconds