Jump to content

Windows vs Linux (and maby mac) RAM managers

Defective_Soul

So not that far ago i found that some application on linux eat less memory on linux then on windows, and i would like to ask, how linux ram manager is so much different from windows or how linux apps eat less memory ?
If not is there some advices for developers wich you can give to opitmize memmory ussage ?

i think this is because linux hawe shared libraries/memory but i not sure about it

Things wich hawe different RAM usage
Cities skylines , 8 gb on windows no mods, 4 on linux no mods
Cursaders kings 3 
ARK survivial evoled
Maby even others (share in comments)

Link to comment
Share on other sites

Link to post
Share on other sites

35 minutes ago, Defective_Soul said:

So not that far ago i found that some application on linux eat less memory on linux then on windows, and i would like to ask, how linux ram manager is so much different from windows or how linux apps eat less memory ?

The memory manager of the OS has no influence on how much memory an individual app uses. That's entirely up to the app. The memory manager is primarily responsible for moving stuff between swap and RAM, freeing up unused memory and other management tasks.

 

At what point did you compare memory usage? Directly after startup, some gaming? Unless you're doing the exact same thing on both platforms, it's completely possible you're measuring different things, because e.g. the map that is loaded isn't quite the same or you're at a different stage in the game where more stuff needs to be loaded into memory and so on.

 

The difference could be down to how e.g. task manager reports memory usage compared to e.g. System Monitor or top (virtual memory,resident memory, shared memory). Be sure to use the details tab on task manager and make the equivalent columns visible there (they are hidden by default).

 

~edit:

Opening Firefox on my Windows laptop and navigating to this topic, I can see 9 Firefox processes with a total memory usage of ~320 MB. Doing the same on my Linux machine, I get around 404 MB (System Monitor). Of course we're comparing an 8 GB laptop with a 32 GB desktop, so it's entirely possible Firefox has decided it can get away with additional cache, which might explain the 25% higher memory usage. No idea what else Firefox is doing in the background. It's really difficult to get an apple-to-apples comparison, especially with modern apps that do all kinds of stuff in the background.

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, Eigenvektor said:

At what point did you compare memory usage? Directly after startup, some gaming? Unless you're doing the exact same thing on both platforms, it's completely possible you're measuring different things, because e.g. the map that is loaded isn't quite the same or you're at a different stage in the game where more stuff needs to be loaded into memory and so on.

 

Same application compiled for 2 different platforms use different amount of ram
Cities skylines use ~4 gigs of ram when you load game while on windows it ~8 gigs
Since so i assume that linux hawe some ways of opitmizing ram ussage, and ... well i not sure if windows hawe shared libraries/memory wich may make windows wersion so ram hungry

Link to comment
Share on other sites

Link to post
Share on other sites

6 hours ago, Defective_Soul said:

Same application compiled for 2 different platforms use different amount of ram

Cities skylines use ~4 gigs of ram when you load game while on windows it ~8 gigs

32 bit vs 64 bit? Sure. But that difference is more typically around 30%, not 100%.

 

Windows vs Linux? There'll be some differences, but nothing that is this extreme. I don't have Cities Skyline to test, but that difference seems too extreme to be down to some OS level optimizations.

 

6 hours ago, Defective_Soul said:

Since so i assume that linux hawe some ways of opitmizing ram ussage, and ... well i not sure if windows hawe shared libraries/memory wich may make windows wersion so ram hungry

Windows also has shared memory. As I said, open the Details tab of task manager. Right click on the headers and make the additional memory columns visible. I can't think of anything that would magically halve memory usage of a program on Linux.

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

All that the operating system does is provide memory to the program, both linux and windows are amazing at that. Cities skylines seems to be using unity, it could be anything: different libraries under linux and windows, some weird part of unity messing something up, etc.

Link to comment
Share on other sites

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×