Frequently Asked Questions - Macaulay2/M2 GitHub Wiki
Collections:
Other questions:
Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS
Try the following:
GC_INITIAL_HEAP_SIZE=50G M2
Probably best to save a few gigabytes of your total RAM size for the system so it doesn't crash. Also see #500.