PLEASE READ, EVEN IF YOU CAN PROVIDE AN IDEA I WOULD BE SO GREATFUL
I’ve been working on a game for nearly a year now, I was just getting ready to release and then the server crashed while doing a long testing session. I think the server crashed due to high memory use. After an hour of searching, I’ve found the main users of memory:
1: network/megaReplicationData
2: netowrk/streamingSolver
3: internal/scriptContext
4: PhysicsParts/Instances
5: Signals
All of these, along with other smaller bits, cause my server to take nearly 3GB with only me in it!!
This is already a very stressful game on the servers, since it is a farming game with other 150k crops ingame at once. I have tried my best to optimize the crops/collection code, and code performance isn’t much of a problem anymore, it’s now memory usage.
My goal is to get down to around 800MB with 1 person in the server, but with the large amount of instances, I would also settle for 1-1.5GB
What are some ways I can lower memory usage in each of these areas? I’m willing to provide code samples, explain how the game works more deeply, even provide access!!
Even if a solution will take a week to implement, I’m willing to do it to get this game preforming how it should.
Things that are not the problem:
- Connection leaks, I very carefully disconnect all connections explicitly
- I will update this as I get more ideas/suggestions
Please help me out!! I know it’s a lot to ask since this is a difficult problem, but I’m losing hope