![]() ![]() ![]() ![]() |
|
in the windows server world, install SQL or exchange and watch it gobble up all the memory it can get
nongeek2025: According to this article - whether you’ve got an entry-level MacBook with the bare minimum RAM or a tricked-out Mac Studio with all the RAM you could afford, macOS will help itself to using it all.
1. Is this true?
2. WHY would any operating system need to access all your RAM. WHAT is it doing?
https://www.howtogeek.com/mac-ram-usage-high-dont-worry-about-it/?
Caching files, mostly.
RAM not needed by the CPU for running programs (MS called it the Working Set), is used for file caching (Standby).
Any data accessed by the CPU must first be pulled (paged) into RAM.
Windows file caching algorithms (called Page Replacement) are based on the theory that if a file is accessed by the CPU, there's a good chance it will be accessed again in the near future.
So once in RAM, data stays there on the Standby list, after a given amount of time if the file hasn't been accessed again it moves to low priority which means the first be replaced first.
This is how file servers work. It's for this reason servers have a crapton of RAM.
It's not a perfect algorithm though and has its shortcomings when applied to desktops, particularly when copying large files to and from the HDD.
I would not consider HowToGeek a reliable source though.......
wellygary:
Although with a Modern PC its really DRAM vs NAND :),
But also the opposite is true, when you use up all the SOC DRAM and it needs more room to allocate, PCs will start paging out blocks of RAM to the SSD (SWAP) (and you will take a performance hot in whatever apps you are running)
Yes, but if a swapfile/page file is in use, the system needs more RAM. Keep in mind it's fairly common these days for end users to disable the page file......
I've got a M2 Macbook with 32G RAM. I've noticed MacOS "Using it all" as well.
My simple fix for this has been to crack open the Macbook with a blunt screwdriver and unsolder one of the 2 x 16G DIMMs it has installed.
Only when I feel that I'm getting close to using 16G of RAM do I re-insert the other stick.
This is called using Hot Swappable RAM. Sometimes the 2nd 16G DIMM isn't hot enough though so I have to take it out and put it in the Microwave for a few minutes to heat it up enough to be properly HOT swappable.
Using this method I am fully in control of how my Macbook uses the RAM I paid for, not it.
To anyone reading, note the above post is a joke.
Put in the same class as DownloadMoreRAM.com - CloudRAM 2.0
Please support Geekzone by subscribing, or using one of our referral links: Samsung | AliExpress | Wise | Sharesies | Hatch | GoodSync | Backblaze backup
MadEngineer: Here’s a simplistic explanation
Based on your comments you’ll be familiar with the old ramdisk software that you could use to store files on. You’ll have found that opening these files or running programs from it loaded nothing short of instantly. It was great until you turned off your machine, forgetting about a doc or something important you’d put there or went to load a large program or file but found you have to turn off the feature, reboot and start again so as to free up some precious ram.
Now imagine that instead of having to balance keeping saved work there copied back to your storage, assigning a new size to it when you run out of memory, managing a separate drive for the speed boost … the OS transparently does all that for you and it’s not limited to files you’re working on but can speed up the whole system.
The problem I always had with Ram Disk is it didn't do anything the OS's own file caching didn't do.
K8Toledo:
The problem I always had with Ram Disk is it didn't do anything the OS's own file caching didn't do.
Not true at all. If you had a 4MB Mac Plus with only a single floppy you could set up a 2MB ram disk and copy files to it. Yes, less room to run your single program at a time but now you had two drives. File caching did not do that.
Back in the day I would copy the entire "Think C" application on to the RAM disk and keep project files on the same floppy as the OS
roobarb:
K8Toledo:
The problem I always had with Ram Disk is it didn't do anything the OS's own file caching didn't do.
Not true at all. If you had a 4MB Mac Plus with only a single floppy you could set up a 2MB ram disk and copy files to it. Yes, less room to run your single program at a time but now you had two drives. File caching did not do that.
Back in the day I would copy the entire "Think C" application on to the RAM disk and keep project files on the same floppy as the OS
How does this make my statement wrong?
You do realise that RAMDisk simply caches files in RAM? Which is exactly what the OS does. Superfetch?
If you can prove otherwise then show me a reliable source.
RunningMan:
The RAM in @muppet's M2 is inside the same SOC as the CPU though, not in DIMMs. Cracking open that SOC to remove half the RAM needs more than a screwdriver and a heat gun🤣
Removing the RAM probably isn't too difficult. Installing new RAM, on the other hand... they don't make it easy!
K8Toledo:
How does this make my statement wrong?
You do realise that RAMDisk simply caches files in RAM? Which is exactly what the OS does. Superfetch?
Traditionally a RAM disk acted as a new logical drive, not a cache of disk accesses.
https://en.wikipedia.org/wiki/RAM_drive
A RAM drive (also called a RAM disk) is a block of random-access memory (primary storage or volatile memory) that a computer's software is treating as if the memory were a disk drive (secondary storage).
In the case of the Mac Plus with a single floppy, accessing multiple volumes required a lot of disk shuffling putting the different mounted disks into the single drive. The RAM disk acted as a completely new drive.
Yep, a RAM disk appears on the desktop as its own disk, and you can put anything you like on it. It's not like the OS-controlled file cache where it'll only cache "active" files.
K8Toledo:
roobarb:
K8Toledo:
The problem I always had with Ram Disk is it didn't do anything the OS's own file caching didn't do.
Not true at all. If you had a 4MB Mac Plus with only a single floppy you could set up a 2MB ram disk and copy files to it. Yes, less room to run your single program at a time but now you had two drives. File caching did not do that.
Back in the day I would copy the entire "Think C" application on to the RAM disk and keep project files on the same floppy as the OS
How does this make my statement wrong?
You do realise that RAMDisk simply caches files in RAM? Which is exactly what the OS does. Superfetch?
If you can prove otherwise then show me a reliable source.
A RAMDisk is assigned a drive letter and stores entire files. You have to manually copy files to the location, either by issuing a command or loading a script.
A cache is managed by the OS and content will be removed depending on algorithms that determine if they are not longer needed or there's a request with a higher priority.
If you are using a RAMDisk applications will expect files to be on that unit, since for all purposes it is a storage device. The application doesn't know it's a volatile storage. For all intents it's anther storage unit in the system. A cache can have content removed and the application still works as intended because the cache is an intermediary storage, and if the content is not in the cache, the OS will load from the permanent storage.
Please support Geekzone by subscribing, or using one of our referral links: Samsung | AliExpress | Wise | Sharesies | Hatch | GoodSync | Backblaze backup
roobarb:
Traditionally a RAM disk acted as a new logical drive, not a cache of disk accesses.
https://en.wikipedia.org/wiki/RAM_drive
A RAM drive (also called a RAM disk) is a block of random-access memory (primary storage or volatile memory) that a computer's software is treating as if the memory were a disk drive (secondary storage).
In the case of the Mac Plus with a single floppy, accessing multiple volumes required a lot of disk shuffling putting the different mounted disks into the single drive. The RAM disk acted as a completely new drive.
Well either you did not understand what MadEngineer and I were referring to or you've taken both our comments entirely out of context.
We were talking about RAM Disk software that uses main memory for caching. You are essentially talking about hard drives.
However I'll respond.
The RAM drive you referred to is this:
I pulled it from the Wikipedia page you got the info from. Your "RAM drive" is essentially an external SSD and therefore irrelevant in the context of this thread.
Or I could answer another way:
As the above drive uses DRAM for storage, what is the difference between that and RAM Disk software that partitions main memory by reserving it for exclusive use of the RAMDisk software, on UPS connected machine?
|
![]() ![]() ![]() ![]() |