The problem with memory in that it tries to fit all data in it. Here is some internal structure of Neo4J https://www.slideshare.net/anikishaev/neo4j-after-1-year-in-production
So basically it’s bad idea to save all data in Neo4J. Better to save only data that used for filtering with item id, which will be linked to the full data.
For now there is no algorithm of distribution of graph DB(i don’t know how FB is working with graph, may be they have something)