I have a database that is roughly 1200GB. I am running it on a server with 128GB of RAM, and 32GB of swap memory. These are my
dbms.memory.heap.initial_size=16g dbms.memory.heap.max_size=16g dbms.memory.pagecache.size=64g
Over time (roughly 2-3 weeks), the swap space on my server gradually fills up until it hits the maximum swap size. At this point the server starts "thrashing" and slows down noticeably. Here's a screenshot:
When this happens I usually have to do a hard-kill of Neo4j. After that the swap space gets freed up:
I'm guessing that for some reason a lot of the pagecache is being moved from RAM to Swap Memory over time, eventually exceeding the swap space available.
Is it possible to prevent Neo4j from moving so much memory to the swap space? Ideally I'd like for as much of the pagecache as possible to remain in RAM.
I have tried changing the
swappiness setting on my Ubuntu server to 10 (and then to 5), but the swap memory still seems to be filling up with the Neo4j cache.