Home | Table of Contents | Edge Memory Allocation | CloverETL 4.6.1
--- | --- | ---
Prev | Edges | Next

## Edge Memory Allocation

Manipulating large volumes of data in a single record is always an issue. In CloverETL Designer, sending big data along graph edges means this:

- Whenever there is a need to carry many MBs of data between two components in a single record, the edge connecting them expands its capacity. This is referred to as dynamic memory allocation.

- If you have a complicated ETL scenario with some sections transferring huge data then only the edges in these sections will use dynamic memory allocation. The other edges retain low memory requirements.

- An edge which has carried a big record before and allocated more memory for itself will not 'shrink' back again. It consumes bigger amount of memory till your graph execution is finished.

By default, the maximum size of a record sent along an edge is 33554432 bytes (32 MB). This value can be increased, theoretically, up to tens of MBs by setting the `Record.RECORD_LIMIT_SIZE` property (Chapter 18, Engine Configuration). `Record.FIELD_LIMIT_SIZE` can also be 33554432 bytes (32 MB) by default. Naturally, all fields in total cannot use more memory than `Record.RECORD_LIMIT_SIZE`.

There is no harm in increasing `Record.RECORD_LIMIT_SIZE` to whatever size you want. The only reason for keeping it smaller is an early error detection. For instance, if you start appending to a string field and forget to reset record (after each record), the field size can break the limits.

| Note
Let us look a little deeper into what happens in the memory. Initially, a record starts with 65536 (64kB) of memory allocated to it. If there is a need to transfer huge data, its size can dynamically grow up to the value of `Record.RECORD_LIMIT_SIZE`. If you ever wondered how much memory a record could consume, then the answer is between `65536` (`64k`) and `Record.RECORD_LIMIT_SIZE`.

In your ETL graph, edges which are more 'memory greedy' look like regular edges. They have no special visual effects.

#### Measuring and Estimating Edge Memory Demands

To estimate how memory-greedy your graph is even before executing it, consult the table below (note: computations are simplified). In general, a graph's memory demands depend on the input data, components used and edge types. In this place, we contribute to understanding the last one. See how much memory approx. your graph takes before its execution and to what extent memory demands can rise.

The following table depicts memory demands for particular edge types in MB and in the multiples of record initial size and record limit size. The limits can be enlarged if necessary.

Table 31.1. Estimated Memory Demands per Edge Type

Edge type | Initial size | Maximum size
--- | --- | ---
Direct | 589824 B (576 kB) | 9 RIS [1] | 100663296 B (96 MB) [2] | 3 RLS [3]
Buffered | 1376256 B (1344 kB) | 21 RIS | 100663296 B (96 MB) [2] | 3 RLS
Phase | 131072 B (128 kB) | 2 RIS | 67108864 B (64 MB) [2] | 2 RLS
Direct Fast Propagate | 262144 B (256 kB) | 4 RIS [4] | 134217728 B (128 MB) [2] | 4 RLS
[1] RIS = `Record.RECORD_INITIAL_SIZE` = 65536 (by default) [2] The size depends on RECORD_LIMIT_SIZE. It can be changed, see Chapter 18, Engine Configuration. [3] RLS = `Record.RECORD_LIMIT_SIZE` = 33554432 (by default) [4] The number 4 is the number of buffers and it can be changed. In general, buffers' memory can rise up to RLS * (number of buffers)

Prev | Up | Next
Turning Off Debug | Home | Table of Contents | Metadata