Memory & Performance tuning#
This page discusses various considerations related to memory usage and
performance tuning when using the swh-graph
library to load large
compressed graphs.
Temporary directory#
Many of the graph algorithms (either for compression or traversal) tend to offload some of their run-time memory to disk. For instance, the BFS algorithm in the LAW library uses a temporary directory to write its queue of nodes to visit.
Because these can be quite large and sometimes overflow the default /tmp
partition, it is advised to systematically specify a path to a local temporary
directory with enough space to accommodate the needs of Python or Rust programs,
using this environment variable:
TMPDIR=/srv/softwareheritage/ssd/tmp