|
| 1 | +--- |
| 2 | +layout: default |
| 3 | +--- |
| 4 | +# ArangoDB Server Pregel Options |
| 5 | + |
| 6 | +## Pregel job parallelism |
| 7 | + |
| 8 | +Pregel jobs have configurable minimum, maximum, and default parallelism values. |
| 9 | +Administrators can use these parallelism options to set concurrency defaults and bounds |
| 10 | +for Pregel jobs on an instance level. Each individual Pregel job can set its own parallelism |
| 11 | +value using the job's `parallelism` option, but the job's effective parallelism is limited by |
| 12 | +the bounds defined by `--pregel.min-parallelism` and `--pregel.max-parallelism`. |
| 13 | +If a job does not set its `parallelism` value, it defaults to the parallelism value |
| 14 | +configured via `--pregel.parallelism`. |
| 15 | + |
| 16 | +### Minimum parallelism |
| 17 | + |
| 18 | +<small>Introduced in: v3.10.0</small> |
| 19 | + |
| 20 | +`--pregel.min-parallelism` |
| 21 | + |
| 22 | +Minimum parallelism usable in Pregel jobs. Defaults to `1`. |
| 23 | +Increasing the value of this option forces each Pregel job to run with at least this |
| 24 | +level of parallelism. |
| 25 | + |
| 26 | +### Maximum parallelism |
| 27 | + |
| 28 | +<small>Introduced in: v3.10.0</small> |
| 29 | + |
| 30 | +`--pregel.max-parallelism` |
| 31 | + |
| 32 | +Maximum parallelism usable in Pregel jobs. Defaults to the number of available cores. |
| 33 | +This option effectively limits the parallelism of each Pregel job to the specified value. |
| 34 | + |
| 35 | +### Default parallelism |
| 36 | + |
| 37 | +<small>Introduced in: v3.10.0</small> |
| 38 | + |
| 39 | +`--pregel.parallelism` |
| 40 | + |
| 41 | +Default parallelism to use in Pregel jobs. Defaults to the number of available cores |
| 42 | +divided by 4. The result will be limited to a value between 1 and 16. |
| 43 | +The default parallelism for a Pregel job is used only if the job does not set its |
| 44 | +`parallelism` attribute. |
| 45 | + |
| 46 | +## Pregel memory-mapped files |
| 47 | + |
| 48 | +By default, Pregel stores its temporary data in memory-mapped files on disk. |
| 49 | +Storing temporary data in memory-mapped files rather than in RAM has the advantage of |
| 50 | +lowering the RAM usage, which reduces the likelihood of out-of-memory situations. |
| 51 | +However, storing the files on disk requires a certain disk capacity, so that instead of running out |
| 52 | +of RAM, it is possible to run out of a disk space. |
| 53 | + |
| 54 | +{% hint 'info' %} |
| 55 | +Please make sure to use a suitable storage location for Pregel's memory-mapped |
| 56 | +files. |
| 57 | +{% endhint %} |
| 58 | + |
| 59 | +### Pregel memory-mapped files usage |
| 60 | + |
| 61 | +<small>Introduced in: v3.10.0</small> |
| 62 | + |
| 63 | +`--pregel.memory-mapped-files` |
| 64 | + |
| 65 | +If set to `true`, Pregel jobs store their temporary data in disk-backed |
| 66 | +memory-mapped files. If set to `false`, the temporary data of Pregel jobs is buffered |
| 67 | +in RAM. |
| 68 | +The default value is `true`, meaning that memory-mapped files are used. |
| 69 | +You can override this option for each Pregel job by setting the `useMemoryMaps` attribute |
| 70 | +of the job. |
| 71 | + |
| 72 | +### Pregel memory-mapped files storage location type |
| 73 | + |
| 74 | +<small>Introduced in: v3.10.0</small> |
| 75 | + |
| 76 | +`--pregel.memory-mapped-files-location-type` |
| 77 | + |
| 78 | +This option configures the location for the memory-mapped files written by Pregel. |
| 79 | +This option is only meaningful, if memory-mapped files are used. |
| 80 | +The option can have one of the following values: |
| 81 | + |
| 82 | +- `temp-directory`: store memory-mapped files in the temporary directory, |
| 83 | + as configured via `--temp.path`. If `--temp.path` is not set, the |
| 84 | + system's temporary directory is used. |
| 85 | +- `database-directory`: store memory-mapped files in a separate directory |
| 86 | + underneath the database directory. |
| 87 | +- `custom`: use a custom directory location for memory-mapped files. The |
| 88 | + exact location must be set via the `--pregel.memory-mapped-files-custom-path` |
| 89 | + configuration parameter. |
| 90 | + |
| 91 | +The default location for Pregel's memory-mapped files is the temporary directory |
| 92 | +(`temp-directory`), which may not provide enough capacity for larger Pregel jobs. |
| 93 | +It may be more sensible to configure a custom directory for memory-mapped files |
| 94 | +and provide the necessary disk space there (`custom`). |
| 95 | +Such custom directory can be mounted on ephemeral storage, as the files are only |
| 96 | +needed temporarily. If a custom directory location is used, you need to specify |
| 97 | +the actual location via the `--pregel.memory-mapped-files-custom-path` parameter. |
| 98 | + |
| 99 | +You can also use a subdirectory of the database directory |
| 100 | +as the storage location for the memory-mapped files (`database-directory`). |
| 101 | +The database directory often provides a lot of disk space capacity, but when |
| 102 | +Pregel's temporary files are stored in there too, it has to provide enough capacity |
| 103 | +to store both the regular database data and the Pregel files. |
| 104 | + |
| 105 | +### Pregel memory-mapped files custom storage location |
| 106 | + |
| 107 | +<small>Introduced in: v3.10.0</small> |
| 108 | + |
| 109 | +`--pregel.memory-mapped-files-custom-path` |
| 110 | + |
| 111 | +Specifies a custom directory location for Pregel's memory-mapped files. |
| 112 | +This setting can only be used, if the option `--pregel.memory-mapped-files-location-type` |
| 113 | +is set to `custom`. When used, the option has to contain the storage directory |
| 114 | +location as an absolute path. |
0 commit comments