Copying database slows down dramatically on the Relationship linking stage

I'm trying to copy a database from version 3.5 to 4.4 using neo4j-adm copy command. The database is huge (about 3tb). Nodes and relationships have been copied successfully during stages 1-2 in approx 20 hours. Hovewer, the 3rd stage (Relationship linking) has been running for more than 2 days. The progress is stuck on 70%. Looking at high cpu and memory usage I suggest that the process is still active.

There are two files changing from time to time:

  • neostore.relationshipstore.db (only modification time changes, size is the same as 2 days ago)
  • temp/neostore.relationshipgroupstore.db (size is growing slowly)

neo4j-adm reported that it would need about 90gb of ram but there is just 64gb (with 100gb swap) on my machine. Could it de a potential problem? For now the process uses almost all of the ram and the half of swap.

The database was created in 3.5.8.
Current version is 4.4.7