Decro Posted October 22, 2017 Share Posted October 22, 2017 (edited) Hello there, i'm sometimes expecting strange things happening about memory, so i have a few questions about it. 1. How much RAM and video-memory MTA may use? Feel's like there is some limits, cause it's just falls into "NOT ENOUGHT MEMORY" crash even using ~half of it. So i just want to know, how much memory MTA may use without overloading? What's the limits? 2. Is there a way to clean memory used by "dxDrawImage" function? I mean, memory is being used by images even when they are won't being shown. 3. How's MTA works with custom models? Seem's like every single model/texture loads directly into RAM, forever, is there a way to avoid this? Maybe a streamer that kinda unload models from RAM if they are too far away from player, or something? Edited October 22, 2017 by Decro Link to comment
Scripting Moderators thisdp Posted October 22, 2017 Scripting Moderators Share Posted October 22, 2017 destroyElement can recover most of usage of RAM and Video Momery. Link to comment
quindo Posted October 22, 2017 Share Posted October 22, 2017 1. There are issues with mta vram/ram management when it comes to graphical components like shaders or textures which may cause them to fail to create even when there's lots of memory still available theoretically. 2. Stuff like dxDrawImage don't stay in memory, they are queued to draw in current frame, and cease to exist afterwards. Textures used by them are stored in memory only. 3. No idea. Link to comment
Simple0x47 Posted October 22, 2017 Share Posted October 22, 2017 2 hours ago, Decro said: Hello there, i'm sometimes expecting strange things happening about memory, so i have a few questions about it. 1. How much RAM and video-memory MTA may use? Feel's like there is some limits, cause it's just falls into "NOT ENOUGHT MEMORY" crash even using ~half of it. So i just want to know, how much memory MTA may use without overloading? What's the limits? 2. Is there a way to clean memory used by "dxDrawImage" function? I mean, memory is being used by images even when they are won't being shown. 3. How's MTA works with custom models? Seem's like every single model/texture loads directly into RAM, forever, is there a way to avoid this? Maybe a streamer that kinda unload models from RAM if they are too far away from player, or something? 3. Well if you want you could destroy the .DFF;.TXD;.COL elements when they are not streamed. But it's not a good idea. Link to comment
Captain Cody Posted October 22, 2017 Share Posted October 22, 2017 (edited) I can at least answer the last one, from my experience, MTA only loads models into memory that are streamed in, and when they are streamed out they are unloaded. This is evident because when my streamer is running on static and I go to a different part of the map there's a few second load time until all of the models initialize Edited October 22, 2017 by CodyJ(L) Link to comment
Scripting Moderators thisdp Posted October 22, 2017 Scripting Moderators Share Posted October 22, 2017 (edited) 34 minutes ago, CodyJ(L) said: I can at least answer the last one, from my experience, MTA only loads models into memory that are streamed in, and when they are streamed out they are unloaded. This is evident because when my streamer is running on static and I go to a different part of the map there's a few second load time until all of the models initialize Just refer to CLEO. If you want to create a vehicle, you need to check whether the model is available first, and then load model into memory. After loading model, you could create a vehicle. But in MTA you don't need to load model when you create an object , a vehicle or a ped etc. Because this step is done when you call "create*" function such as createObject . Anyway, if you want to load external dff, txd, col, you can't skip this step. So we have engineLoad* functions which can be cleared by destroyElement to load external model into memory. Edited October 22, 2017 by thisdp Link to comment
ShayF2 Posted October 22, 2017 Share Posted October 22, 2017 (edited) Debugging the cpu and ram usage of my server while it contains many mods and many scripts, certainly not as big as CodyL's server, however it is probably the size of a normal MTA Freeroam server. The ram usage always stays below 1GB, and cpu usage always stays under 10%. I have 4GB's of ram and dual core 3.7GHz cpu dedicated to the server. I have plenty left over to run whatever else I need on the vps, such as a website, database, mail server, what have you. Possibly even another MTA server. Edited October 22, 2017 by ShayF 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