Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raising the GTASA 3gb memory limit #3928

Open
1 task done
CarlRayanitch opened this issue Jan 6, 2025 · 16 comments
Open
1 task done

Raising the GTASA 3gb memory limit #3928

CarlRayanitch opened this issue Jan 6, 2025 · 16 comments
Labels
enhancement New feature or request

Comments

@CarlRayanitch
Copy link

CarlRayanitch commented Jan 6, 2025

Is your feature request related to a problem? Please describe.

Yes, the 3GB memory limit in GTA:SA causes frequent client crashes. This makes it hard to host large servers, especially for my 3.5GB server that uses a lot of GTA's memory, and affects stability.

Describe the solution you'd like

Raise the 3GB memory limit. or allow the use of smth like 'SA.Limit.Adjuster' this would improve server stability, allow for larger servers, and make it possible to add more creative content.

Describe alternatives you've considered

There are no real alternatives. The only solution is to raise the 3GB limit for all clients.

Additional context

Image

Security Policy

  • I have read and understood the Security Policy and this issue is not about a cheat or security vulnerability.
@CarlRayanitch CarlRayanitch added the enhancement New feature or request label Jan 6, 2025
@Nico8340
Copy link
Contributor

Nico8340 commented Jan 7, 2025

GTA:SA was released as a 32-bit (x86) application, which comes with limitations, including the 3GB memory barrier, and it cannot be bypassed, regardless of any modifications or workarounds

@Meine1
Copy link

Meine1 commented Jan 7, 2025

IIRC many years ago the fastman92 limit adjuster was considered but it wasn't implemented because of licensing issues or something weird like that.

@TheNormalnij
Copy link
Member

TheNormalnij commented Jan 7, 2025

Raise the 3GB memory limit. or allow the use of smth like 'SA.Limit.Adjuster' this would improve server stability, allow for larger servers, and make it possible to add more creative content.

Or just split your IMG's. The current internal HTTP server works poorly with big files, so smaller files are efficient.

nginx is mandatory if you have big (>0.5 GB) files

@Meine1
Copy link

Meine1 commented Jan 7, 2025

Or just split your IMG's. The current internal HTTP server works poorly with big files, so smaller files are efficient.

is there an ideal file size for IMG archives?

@CarlRayanitch
Copy link
Author

CarlRayanitch commented Jan 7, 2025

Raise the 3GB memory limit. or allow the use of smth like 'SA.Limit.Adjuster' this would improve server stability, allow for larger servers, and make it possible to add more creative content.

Or just split your IMG's. The current internal HTTP server works poorly with big files, so smaller files are efficient.

nginx is mandatory if you have big (>0.5 GB) files

it's about memory not file size

@TheNormalnij
Copy link
Member

it's about memory not file size

To send a file to a player, the server reads the entire file into memory. This is the worst part.

is there an ideal file size for IMG archives?

Nginx can handle any file. Check how many requests the internal http server can handle on your host.

@derxgbb
Copy link

derxgbb commented Jan 7, 2025

@TheNormalnij
I think the OP was talking about client crashes, if you check the image that's the client exe not server.
He just can't describe his problem well.

fastman92 limit adjuster has nothing to do with memory.
Read this: https://en.wikipedia.org/wiki/3_GB_barrier

@Meine1
Copy link

Meine1 commented Jan 7, 2025

Silent made a tool that makes old GTA games recognize up to 4GB of RAM, might be worth trying https://www.mixmods.com.br/2016/09/iii-vc-sa-largeaddress-reconhecer-3-4-gb-de-ram/

@botder
Copy link
Member

botder commented Jan 7, 2025

Silent made a tool that makes old GTA games recognize up to 4GB of RAM, might be worth trying https://www.mixmods.com.br/2016/09/iii-vc-sa-largeaddress-reconhecer-3-4-gb-de-ram/

That's already enabled.

@TheNormalnij
Copy link
Member

@TheNormalnij I think the OP was talking about client crashes, if you check the image that's the client exe not server. He just can't describe his problem well.

Only HTTP server and CRC32 check block big files.

Yes, the 3GB memory limit in GTA:SA causes frequent server crashes. This makes it hard to host large servers, like my 3.5GB server, and affects stability.

@derxgbb
Copy link

derxgbb commented Jan 8, 2025

I know that he wrote the word serverand not client but then he showed an image of the task manager where the game client is shown, that its using 3.2GB of RAM already.
Then he talks about limit adjusters which is purely a game client thing.

Not to speak about that MTA has 64bit version of server where there is no memory limit at all. The blocking of big file is true, and you have a point on that but I think OP didn't want to talk about that. Even if he splits up his images he can't exceed the 3/4GB RAM memory limit on clients.

Keep in mind that normal people often talk about server crash when technically its a client crash. They say server because its not the base game, its the server client. But this is only my guess and sorry if indeed his problem was the one you described to him.

@Kinimel
Copy link

Kinimel commented Jan 8, 2025

I know that he wrote the word serverand not client but then he showed an image of the task manager where the game client is shown, that its using 3.2GB of RAM already. Then he talks about limit adjusters which is purely a game client thing.

Not to speak about that MTA has 64bit version of server where there is no memory limit at all. The blocking of big file is true, and you have a point on that but I think OP didn't want to talk about that. Even if he splits up his images he can't exceed the 3/4GB RAM memory limit on clients.

Keep in mind that normal people often talk about server crash when technically its a client crash. They say server because its not the base game, its the server client. But this is only my guess and sorry if indeed his problem was the one you described to him.

I completely agree with your analysis. The initial confusion around "server" versus "client" is understandable, but the visual evidence is clear: the problem lies with the game client, which is already consuming a significant amount of RAM.
The limit adjusters are a crucial client setting and may be the root cause of the issue. It's important to note that unlike the client, the server, especially on 64-bit versions, has more flexible memory resources.
You raised a valid point about large file throttling, but I believe the original discussion was more focused on finding a solution to the client's high memory consumption.
To troubleshoot the issue, I suggest the user check the limit adjuster settings on the game client and, if necessary, adjust them to free up more memory.

@botder
Copy link
Member

botder commented Jan 8, 2025

See also #2336

@CarlRayanitch
Copy link
Author

I know that he wrote the word serverand not client but then he showed an image of the task manager where the game client is shown, that its using 3.2GB of RAM already. Then he talks about limit adjusters which is purely a game client thing.

Not to speak about that MTA has 64bit version of server where there is no memory limit at all. The blocking of big file is true, and you have a point on that but I think OP didn't want to talk about that. Even if he splits up his images he can't exceed the 3/4GB RAM memory limit on clients.

Keep in mind that normal people often talk about server crash when technically its a client crash. They say server because its not the base game, its the server client. But this is only my guess and sorry if indeed his problem was the one you described to him.

very well said on everything, and yes it's the client starting to lag when reaching 3gb and then crashing

@derxgbb
Copy link

derxgbb commented Jan 8, 2025

@CarlRayanitch

Well as botder said the memory limit already been raised to 4GB, I think it consists of 1GB VRAM + 3GB RAM. This is the max.

Sadly the game is too old, it is a 32bit application, uses only 1 core. (if someone has Intel CPU with HT 'on' he might set it 'off' to get more one-core efficiency)

The best you can do is to minimize texture sizes, quality and unload them if they are not nearby etc. The game cannot be updated to 64 bit

@CarlRayanitch
Copy link
Author

@CarlRayanitch

Well as botder said the memory limit already been raised to 4GB, I think it consists of 1GB VRAM + 3GB RAM. This is the max.

Sadly the game is too old, it is a 32bit application, uses only 1 core. (if someone has Intel CPU with HT 'on' he might set it 'off' to get more one-core efficiency)

The best you can do is to minimize texture sizes, quality and unload them if they are not nearby etc. The game cannot be updated to 64 bit

damn that's sad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants