oVVen Posted February 20, 2019 Share Posted February 20, 2019 (edited) I'm having a Multi Theft Auto server, installed on my Virtual Private Server. After 40-50 players, I'm experiencing some drop frames (all the players are getting it). As specifications I'm using an i7 6700K (2 cores) and 12 GB Ram. Can anyone explain to me from what can I get drop frames? Server has 500+ FPS, sometimes are 550 and may decrease to 520. Edited February 20, 2019 by oVVen Link to comment
Scripting Moderators ds1-e Posted February 21, 2019 Scripting Moderators Share Posted February 21, 2019 (edited) 8 hours ago, oVVen said: I'm having a Multi Theft Auto server, installed on my Virtual Private Server. After 40-50 players, I'm experiencing some drop frames (all the players are getting it). As specifications I'm using an i7 6700K (2 cores) and 12 GB Ram. Can anyone explain to me from what can I get drop frames? Server has 500+ FPS, sometimes are 550 and may decrease to 520. Most likely it's fault of scripts, thanks to IIYAMA i got some information about that. There can be plenty of reasons: - badly optimized scripts - too much elementData's (if you don't turn off synchronization, it synchronize with every player and also server), more players = more server resources usage. - high-res models/a lot of objects, or players in one place. - weapon sounds. - things which are drawing frequently on player screen (OnClientRender) I suggest you to check which resource, and what exactly is making big traffic/takes a lot of % of CPU. You will need a resource called 'ipb' which you should have within base server resources. Type start ipb in console, and then, once again type ipb. After that you will have possibility to check which resources are using a lot of CPU/server resources. If i am wrong, i bet IIYAMA, or someone else will correct me. Edited February 21, 2019 by majqq 3 Link to comment
oVVen Posted February 21, 2019 Author Share Posted February 21, 2019 (edited) Can I use something else instead of elementData's? And disabling synchronisation can harm the other scripts (where can I disable it). Edited February 21, 2019 by oVVen Link to comment
Scripting Moderators ds1-e Posted February 21, 2019 Scripting Moderators Share Posted February 21, 2019 (edited) 9 minutes ago, oVVen said: Can I use something else instead of elementData's? And disabling synchronisation can harm the other scripts (where can I disable it). You can use tables as fast-temporary-storage, i will test soon custom temporary data system, thanks to help from MTA forums. (Check topics which i have created, related to them.) You can read about it here, it's simple, i already learned how to use it. Of course you don't need to use tables everywhere, you can setElementData, only when is important and needed, that's what i learned. Edited February 21, 2019 by majqq 1 Link to comment
oVVen Posted February 21, 2019 Author Share Posted February 21, 2019 Disabling the synchronisation is a mtaserver.conf setting or can I disable it from the function? Link to comment
Scripting Moderators ds1-e Posted February 21, 2019 Scripting Moderators Share Posted February 21, 2019 (edited) 4 minutes ago, oVVen said: Disabling the synchronisation is a mtaserver.conf setting or can I disable it from the function? No, you can disable synchronization whenever you setElementData. Anyway i had bad experience with elementData's, with same count of players. That's why i'm gonna test custom system for it. I don't think so that disabling fourth argument will help so much. https://wiki.multitheftauto.com/wiki/SetElementData bool setElementData ( element theElement, string key, var value [, bool synchronize = true ] ) Edited February 21, 2019 by majqq 1 Link to comment
oVVen Posted February 21, 2019 Author Share Posted February 21, 2019 Is there a limit of a resource consumption? I'm having resources with 1, 2 or even 5%. Also, the drop frames are adding resources with high usage, and then it's coming back to normal state. Example: The server uses 1~2% of CPU, and jumps to even 10% (on ipb). On the VPS using the "htop" it shows me that is using 5%, and when the drop frames are coming, jumps to 70%. I've been struggling to solve this problem for a long time Link to comment
Moderators IIYAMA Posted February 21, 2019 Moderators Share Posted February 21, 2019 40 minutes ago, oVVen said: Is there a limit of a resource consumption? I'm having resources with 1, 2 or even 5%. Also, the drop frames are adding resources with high usage, and then it's coming back to normal state. Example: The server uses 1~2% of CPU, and jumps to even 10% (on ipb). On the VPS using the "htop" it shows me that is using 5%, and when the drop frames are coming, jumps to 70%. I've been struggling to solve this problem for a long time Use the ipb on yourself instead of your server. The server can indeed have influence on the client his FPS, but clientside has far more direct influence on the FPS. Link to comment
oVVen Posted February 23, 2019 Author Share Posted February 23, 2019 (edited) On myself? How? I have a single option, and that's "server". That's showing my CPU consumption. I still haven't realized from what comes the dropframes. There are some resources which consumes 0.1% CPU and jumps to 1, maybe 2-3% CPU consumption (I saw that this jump caused the drop frames). Could be from the host? Idk. Probably because the processor has only two cores? Edited February 23, 2019 by oVVen Link to comment
Moderators IIYAMA Posted February 23, 2019 Moderators Share Posted February 23, 2019 (edited) 2 hours ago, oVVen said: On myself? How? I have a single option, and that's "server". That's showing my CPU consumption. I still haven't realized from what comes the dropframes. There are some resources which consumes 0.1% CPU and jumps to 1, maybe 2-3% CPU consumption (I saw that this jump caused the drop frames). Could be from the host? Idk. Probably because the processor has only two cores? There should be a checkbox with the label: "Include clients" (on the top part you just cut off) Not sure if they disabled or removed it. Another way to view this information can be accessed with the browser: http://127.0.0.1:22005/resourcebrowser/ There you can do the same thing. Edited February 23, 2019 by IIYAMA Link to comment
Discord Moderators Pirulax Posted February 23, 2019 Discord Moderators Share Posted February 23, 2019 He's talking about server framerate, not client framerate, so, what @majqq said: Quote - high-res models/a lot of objects, or players in one place. - weapon sounds. - things which are drawing frequently on player screen (OnClientRender) Isn't correct, the mentioned things only affect client FPS, but not server. Link to comment
Moderators IIYAMA Posted February 23, 2019 Moderators Share Posted February 23, 2019 10 minutes ago, Pirulax said: He's talking about server framerate, not client framerate, so, what @majqq said: Isn't correct, the mentioned things only affect client FPS, but not server. He said two things: On 20/02/2019 at 21:17, oVVen said: Server has 500+ FPS, sometimes are 550 and may decrease to 520. This doesn't sounds like server that can't handle things any more. On 20/02/2019 at 21:17, oVVen said: I'm experiencing some drop frames (all the players are getting it) This sounds like a clientside issue to me. But if the serverside also plays a role in it, that really depends on the resources. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now