Optimisation Help

Hey guys, I’m working on a fairly large project with a friend of mine and we were wondering how to optimise better and what good optimisation looks like. (In terms of server memory usage etc.)

He’s a fairly amateur scripter so we’re accepting any tips. We intend to have 100-200 players in a server, I have run projects of this size/activity before but I want to be far more performant with this one. It is a community based, roleplaying game. Please note again, our main concern is the server and NOT the client.

Right now, our server memory usage looks like this:

The game currently contains a set of weapons, animations, particles and scripting for:

  • Fairly advanced Melee + Shield Combat (With multiple keybinds and actions, using raycasting)
  • Inventory System
  • Crafting System

But it will also include many more features including deployable/destroyable items, fishing, mining and other activities. Our current memory usage is stable, we have no data leaks.

What is a good amount of server memory usage to look for, is there other ways of checking server performance? Is it worth recoding our current progress to be more efficient? Is there any things you can change/remove for better performance?

And finally, how bad is ReplicatedStorage, I’ve heard a lot of people saying that it’s bad, what alternative can you use?

Here there is a really REALLY good article I know about all of this! Improving Lag - Devforum
For your question, replicated storage is “Bad” because it has to load into the clients RAM. So essentially this is for things that need to be accessed from the client frequently such as VFX, so it doesn’t have to load in. A alternative is server storage, which is only loaded on the server. This prevents lag, and can still be switched in and out of the game, but assets will have to load for the client. Takes usually about 0.3 seconds? From my experience?

1 Like

When it comes to memory usually for computers we would rather focus more on speed rather than memory

If you are worried about memory you probably only want to worry about the clients memory as usually servers don’t usually suffer that much. from having a lot of objects in game. In fact there are modules out there that actually sacrifice memory for speed e.g. PartCache

1 Like