Windows vs Linux RAM Usage - Is Linux Better Than Windows?

preview_player
Показать описание
Windows and Linux are both modern multitasking operating systems which use virtual memory to run multiple tasks or processes. However are they the same? Is one a lean mean fighting machine and the other a memory hog? Let's find out.



#garyexplains
Рекомендации по теме
Комментарии
Автор

Yeah a video on virtual memory and how the OS and processes are handled with the MMU and such. Would be pretty interesting as has been a long time since I learnt about it and I don't really remember the ins and outs.

satysin
Автор

Linux has long had better memory management compared to not just Windows, but a number of other OSs. I know Linus and the Kernel crew were somewhat obsessive about memory management and making sure things used memory efficiently.

At one point, I was working for a company in Montreal, and they had been running a Web based JAVA application on (at the time) Sun's Solaris, and were constantly have problems with stability, which we traced to memory. Back then, Sun Workstation memory was very expensive, so I said, let's try putting Linux on the same workstation, and see how the app runs since I knew that Linux was better with memory management. I prepared a Sun workstation that we had laying around as a spare with Linux, and all the appropriate software...and sure enough, it was totally stable, and our QA people tested it and they found it stable, and faster as well through their entire test suite. What I didn't tell them is that the workstation I had used had only half the memory the big server the software was going to run on!

BTW, that's a nice view of the Parliamentry LIbarary in Ottawa in the background!

FarrellMcGovern
Автор

I have prepared Linux systems that run in 32MB of RAM (yes MB, not GB), with GUI and no swap. It wasn't meant for general usage (prepared using Yocto for medical devices), but gives an idea of what you can achieve. I felt like an artisan sculpting a gem.
[EDIT] Clarification to address some random replies: The device was a medical device able to operate without interruptions for years if necessary, the last test I know it was operating for 6 months w/o interruption, but years was the target, and had to support OTA and operate with no swap. The UI was touch driven and responsive, IEC 62366-2 certified. I'm sure that there are other options in the market, but I doubt many tick so many boxes. And yes, a version of Windows for Devices, Windows Embedded or WIndows IOT (or whatever name it has today) was part of the platform set evaluated by the customer.

ernestuz
Автор

This is yet another reason to love Linux, as it can make older hardware even those limited to to 4GB RAM usable, were as WIndows on the same hardware is a no go.

CommodoreFan
Автор

And that's with PopOs Gnome, which is kind of known as a ram hog in itself. I bet with KDE or Xfce the results would be even lower. But of course if we're only talking about raw ram usage numbers.

iodreamify
Автор

would love that memory (virtual) allocation video! :D

yaBoyDreamer
Автор

interestingly Windows is really optimized on swapping to compensate that memory usage and prevents lockup or stall while Linux memory usage is low but when on high pressure memory usage and started to swap it tends to locks up (if you dont have the prelockd, nohang, le9 patch, etc..)

albertstarfield
Автор

I noticed the difference with a 2016 laptop a little over 2 years ago. I couldn't even get windows 8.1 to load up Blender. It worked perfectly fine when using Linux mint. True I wasn't gong to be doing heavy tasks with it. As it was a entry level laptop. But been able to load it in the first place said it all.

dappermuis
Автор

A fun exercise. It should be said using more memory is not necessarily a bad thing. Memory if used to enhance speed it's a good thing, if a program is carrying unused baggage and making memory unavailable to others it's a bad thing.

test
Автор

I've seen others say Windows uses 4GB of RAM after boot but I've never seen it myself. I'm currently using 3.4GB out of 16GB, with two Firefox/YouTube tabs open and 20hrs. uptime. It is worth noting I've seen both Windows and Linux use more RAM when more is available. With 4GB total Windows 10 will use 1.6GB after boot, compared to 2.4GB with 16GB total.

HumbleBountyHunter
Автор

Does zram / dump on linux have significant impact, and how does that compare to pagesys on windows.

Can you please do a video on that?

gokuljosh
Автор

Thanks Gary. Nice vid, the only thing one might be asking is WHY does windows use more than linux for the same program? Are there decisions made like "lets load the whole lot into ram so things load quicker when the user wants them..."

Gavinconaghty
Автор

I have 16gb of memory on my laptop running Arch Linux. It still amazes me that I can use nearly all of it just by opening up PyCharm and Firefox.

drgrnUK
Автор

I’m curious about how this compares to MacOS

curiouskitkat
Автор

Can we do Linux vs FreeBSD? Is there even a difference in memory usage?

thomasmabika
Автор

I completely agree on this video and I can even mention that even the CPU usage seems to be much lower in Linux than Windows 10. I notice on the battery life and fan usage. When I run windows I hear frequently the fan running and battery life last less than when I use Linux. I even tested this in a completely new install in Windows and same result.

felixlf-lorentz
Автор

From my humble point of view Gary's YT is the one of the most exciting and consistent tech channel available. Thanks for all the videos provided so far. This one is outstanding since I am happy user of great Linux since 2k. Thank you! Have a nice day!

markusbuchholz
Автор

Yes, I want that video on virtual memory. Thanks for this one!

sudipchatterjee
Автор

Yes videos on memory are interesting, I remember being a developer in the early 90’s, and being particularly concerned about the impact of ‘page thrashing’ on the logistics system we were developing, but not truly understanding the concept and so feeling limited in my design decisions… long time ago, fun times 😁

mckengineer
Автор

Actually, yeah, it'd be cool to make a video on how memory is actually organised and how the structural difference impacts the performance, especially before the systems starts swapping (which is obviously going to happen sooner with the Windows system, even cheating on the swappiness on the Linux system to force it swap earlier). Basically, if you had an infinite amount of RAM on either system, is one system more performant than the other?

RegisMichelLeclerc