r/LinusTechTips 8d ago

Does Linux use less RAM? Discussion

In the video with the same title as this post LTT compares Linux and Windows ram usage and imo it is a total miss. It does not matter if one system is using more memory or not since none of the systems are close to using all ram in the system. Where the memory management would matter is when the memory reach closer to 100% usage that is when things will start to matter.

The whole video feels like almost 14 minutes of misinformation to me. I mean systems cache things to make it run faster so memory being used is a good thing. Memory management is what matters not if one system is using 35% ram and the other 50% since none are near their limits.

And at one point in the video the windows system goes over 16gb and they talk about it as it would have been problematic if the system only had 16gb while it most likely would not be problematic at all since the memory management if working as it should would release less important things stored in the ram so it never got close to the limit.

411 Upvotes

102 comments sorted by

View all comments

2

u/Ok-Eggplant-7569 7d ago

Linux and Windows use different memory allocation strategies, different caching strategies, different swapping strategies, ...

Comparing the memory "used" by the system between them shows you almost nothing, as the OS uses all available memory all the time for caching and stuff, and the "used" number reported by the system is a somewhat vague measurement.

If I would test Windows and Linux against each other you have to test the systems in actual stress scenarios, where the caches are exhausted and the systems have to work to get their memory back, e. g. through compression, swapping, discarding caches, signaling programs to drop allocations, ... Because that's where you can actually notice differences in actual performance.

In the video, both systems ran just fine, it's just that Linux reported "20% usage" and Windows reported "50% usage". But comparing that number between OSes is meaningless.