observing excessive swapping when copying large files

There has been an interesting discussion on the LKML (Linux Kernel Mailing List) last summer:
https://lkml.org/lkml/2019/8/4/15
(Subject: »Let’s talk about the elephant in the room - the Linux kernel’s inability to gracefully handle low memory pressure«)

This type of out-of-memory problem continues to be a hard nut to crack.