[Help] Optimize server

hello, im using profiler to see why my server is hitching high ms, usually the console is spamming
server thread hitch warning: timer interval of 200-300 milliseconds

but some times its 700ms

so i optimizes my scripts (server side and client side) with the help of profiler, but i cant optimize those. someone told me my vps is not good, but im using a vps in zap with 32 ram and 12 vcpu, ram/cpu is always bellow 20%

here are the results from profiler record 500

Hey!
Those performance graphs definetely dont seem good for your Specifications, can you DM me your customer ID and Server IP? I would like to check this issue :slight_smile:

Greetings

1 Like

Do you make your own scripts?

1 Like

yes and no, i have customize some default scripts, some are defaults and some of them are premium scripts

When you do your own scripts or changing a other script just make sure that you are not making unneccesary loops and instead for yousing a lot of natives, do use variabels with the native or a function if it also is in need.
Example: local ped = GetPlayerPed(-1)
You can also do loops with Wait(10) instead of Wait(0).
This is things I have tested and do optimize scripts aswell.

1 Like

thank you for the tip, I will check the scripts again.
I did a little search and my VPS is really monster for a fivem server, it should not have problem even if the code was not optimised, so the problem is somewhere else.
but thank you