MacInTouch Amazon link...
Channels
Apple, Products
I went so far as to use Terminal to remove both Spotlight and Safari. The underlying operating system kept working just fine. I used EasyFind as my Spotlight replacement. Little Snitch and Activity Monitor grew a lot quieter, and my spreadsheet work stopped showing signs of constricted RAM, so I shut off Apple's automagic "Memory Pressure" RAM swap, which was il-suited to my SATA I connection, even with an SSD as the swap target.
EasyFind... interesting and might be worth giving it a shot. I read a couple of EasyFind reviews via the App Store, and the only negative is that it is not compatible with APFS-formatted drives. Because it's a free app, it may or may not ever be upgraded to work with APFS. Since I'm on Sierra 10.12.16, and will be for the foreseeable future, I might give it a shot.
 


Ric Ford

MacInTouch
It might be possible to run a core macOS in as few as 4 GB, but not compatibly with Apple's sales goals.
The Recovery HD system is 0.6 GB in size.

A freshly installed, absolutely stock Mojave system takes less than 13 GB (on a 2017 iMac 5K), including Apple's standard apps, etc.

The macOS Sierra installer (on a flash drive) is 5.17 GB in size.
 


469.08 GB is available on the 499.9-GB hard drive. That's 30.82 GB, though even as I watch, the available storage reported varies slightly.
A freshly installed, absolutely stock Mojave system takes less than 13 GB (on a 2017 iMac 5K), including Apple's standard apps, etc.
Your comment, Ric, sent me back to look deeper. Mea culpa, I forgot to look in the Downloads folder where I found the 6.04GB Mojave Installer, 69.5MB of Logitech Installers, and then on the Desktop, another 200MB disk image.

Using the About This Mac > Storage > Manage file browser shows the Downloads I listed above (6.16GB), Desktop 600.1MB (those disk images with Quicken data), and zero bytes in Documents, Movies, Music, Pictures, Public.

Here's what may be the most signficant revelation on that Tab, shown in the left side panel:
  • Applications = 10.96 GB
  • Documents = 6.76 GB (reflecting Downloads and disk images on Desktop, as the Documents folder itself is empty)
  • Music Creation = 2.36 GB (which is the GarageBand Sound Library)
  • Books, iCloud Drive, iTunes, Mail, Messages, Photos, and Trash = zero bytes
But most interesting:
  • System = 7.78 GB
This on a 2014 Mini I just unboxed and immediately updated to Mojave.

The Recovery HD system is 0.6 GB in size.
I presume that's because the actual Recovery install (that 6GB Mojave Installer) is downloaded from the Internet if a Time Machine restore isn't available?
Apple Support said:
About macOS Recovery hosts and ports
To reinstall macOS with macOS Recovery, you have to connect to the Internet.
Not sure what the differences are between a recovery possible using a Recovery partition and Internet Recovery, which, as I understand it, is the "fallback mode" if the Recovery partition itself is missing or corrupt. Saw hints on the 'net that the OS version which is installed may differ, with the Internet Recovery possibly reverting to what shipped with the Mac?
 


Apple is layering on these applications and services both because Apple managment must view them as value-adds that appeal to customers, and, of course because Apple is ever more about selling recurring services for which both iOS and macOS are gateways. It might be possible to run a core macOS in as few as 4 GB, but not compatibly with Apple's sales goals.
Don't forget that making a Mac run slowly because of inadequate RAM that cannot be upgraded is an excellent way of making people buy new computers!
 


Ric Ford

MacInTouch
I'm amazed at how little RAM is used by macOS 10.12 Sierra. (I haven't tested other versions yet.)

A 2017 iMac 5K with 40 GB of RAM installed is currently running Capture One Pro, FileMaker Pro, BBEdit (large file open), Querious, Transmit, LibreOffice, Safari, Firefox, Postbox, iCab, and Activity Monitor.
Activity Monitor said:
Physical Memory: 40.00 GB

Memory Used: 15.05 GB
App Memory: 12.53 GB​
Wired Memory: 2.51 GB​
Compressed: 0 bytes​

Cached Files: 14.72 GB

Swap Used: 0 bytes
And it feels fast. (I hope to test with a client's Nikon D850 files and Photoshop workflow later.)
 


I'm amazed at how little RAM is used by macOS 10.12 Sierra. (I haven't tested other versions yet.)
Yep, I will also hand it to the Sierra OS for doing a good job with RAM.

I have two 2011 17" MacBook Pros and two 2012 15" MacBook Pros. Only one of the 17" models has 16 GB of RAM; the other 3 have 8GB RAM, and I don't feel any difference between them, even with Logic X and FCP X or numerous applications open. That SSD swapping thingie must work fairly well.
 


Ric Ford

MacInTouch
I have two 2011 17" MacBook Pros and two 2012 15" MacBook Pros. Only one of the 17" models has 16 GB of RAM; the other 3 have 8GB RAM, and I don't feel any difference between them, even with Logic X and FCP X or numerous applications open. That SSD swapping thingie must work fairly well.
It may not be swapping at all (and hopefully isn't). I'd be curious to know what Activity Monitor says when you're running a bunch of the "pro" app work on an 8GB RAM Mac.
 


One of my clients has his Mojave 2017 iMac set up to share his Home folder over the LAN. There are lots of files and folders inside the usual places. When logging in from another, older Mac (2009 24" iMac running El Capitan), this client machine is literally unusable while the Finder attempts to read the contents of a folder until, many minutes later, the folder's contents display and the client Mac may be used again.

Our solution was to use CommanderOne, which can do the login and display a list view of the shared folders' contents with zero delay. We can open the file(s) as necessary over the network from within CommanderOne's interface. (Maybe Steve was right to try eliminating the Finder in early OS X builds.)
#1. Turn off icon preview on the client Mac! That is a sharing killer. Make it the default on the share folder. If that isn’t it, well then...

1a) make sure the share is in the privacy of Spotlight (in spotlight prefs). Indexing share volumes... ughhh

2) replace the Ethernet cable. Easiest and simplest.

3) WiFi sharing works but... with lots of small files, this could be a killer.
 


It may not be swapping at all (and hopefully isn't). I'd be curious to know what Activity Monitor says when you're running a bunch of the "pro" app work on an 8GB RAM Mac.
I don't use those computers, but I'll try to take a look this week and will post back here. My 2011 MacBook Pro 17" has 16 GB, and the OS takes whatever it can get. It frequently gets down to 1 or 2 GB [free]. I doubt it matters, but I routinely go ahead and release non-busy RAM with "FreeMemory", because it makes me feel better.

Is there a particular page or place in Activity Monitor that shows detailed usage of Swap memory? Is it the Swap Used item down at the bottom of the Memory tab? I've never really paid attention to it. At the moment, with 5.43 GB free, it says 2.2 GB of Swap Used.
 


Ric Ford

MacInTouch
Is there a particular page or place in Activity Monitor that shows detailed usage of Swap memory? Is it the Swap Used item down at the bottom of the Memory tab? I've never really paid attention to it. At the moment, with 5.43 GB free, it says 2.2 GB of Swap Used.
Activity Monitor has built-in help:
Activity Monitor Help said:
View memory usage

You can see the amount of system memory being used on your Mac.
  • Click Memory in the Activity Monitor window to see the following in the bottom of the Activity Monitor window:
    • Memory Pressure: Graphically represents how efficiently your memory is serving your processing needs.
      Memory pressure is determined by the amount of free memory, swap rate, wired memory, and file cached memory.
    • Physical Memory: The amount of RAM installed.
    • Memory Used: The amount of RAM being used and the amount that’s immediately available.
    • Cached Files: The size of files cached into unused memory to improve performance.
    • Swap Used: The amount of space being used on your startup disk to swap unused files to and from RAM.
    • App Memory: The amount of space being used by apps.
    • Wired Memory: Memory that can’t be cached to disk, so it must stay in RAM. This memory can’t be borrowed by other apps.
    • Compressed: The amount of compressed memory in RAM.
      When your computer approaches its maximum memory capacity, inactive apps in memory are compressed, making more memory available to active apps. The Compressed Mem column indicates the amount of memory being compressed for an app.
  • To make more columns visible, choose View > Columns.
You can use Activity Monitor to determine if your Mac could use more RAM.
I didn't realize that you could add more data columns via the View menu, though I knew you can also click on column headings (e.g. "Memory" or "Compressed Memory" to sort by that value.
 


I didn't realize that you could add more data columns via the View menu, though I knew you can also click on column headings (e.g. "Memory" or "Compressed Memory" to sort by that value.
I read the item descriptions above and added a few more columns in the Memory page view, but as my mother used to say, it's still "clear as mud". It would be nice if you could add a column for "Swap Used" to see which apps and processes are using the startup disk "to swap unused files to and from RAM".
Memory Pressure: Graphically represents how efficiently your memory is serving your processing needs.
I don't really understand this one. It sounds like something someone made up to sound impressive. I'll have to reboot at some point and see how it changes.
 


Ric Ford

MacInTouch
Memory Pressure: Graphically represents how efficiently your memory is serving your processing needs.
I don't really understand this one. It sounds like something someone made up to sound impressive. I'll have to reboot at some point and see how it changes.
Probably all you really need to review is what's at the bottom of the page – Memory Pressure and the summary data, including Swap Used.

You can probably think of "Memory Pressure" as the demand on memory resources — in other words, how hard you're using the physical RAM in your computer. High memory pressure, I assume, means you're running out of memory, and things are about to slow down and get more complicated under the covers (swapping, compression, etc.).

If Memory Used is well below the Physical Memory size, and Memory Pressure stays low, and Swap Used is 0, then you probably have enough RAM for what you're doing. (If not, then you can probably expect slowdowns and hammering of your boot drive.)

As I mentioned, I can run a lot of apps with no RAM pressure or constraints, but I'm not using Adobe apps nor Apple "pro" apps nor Microsoft Office, so I'm curious about how they behave and what RAM they demand.
 


I don't really understand [Memory Pressure]. It sounds like something someone made up to sound impressive. I'll have to reboot at some point and see how it changes.
It is made up, and according to Apple, the made-up categories mean:
Apple Support said:
How to use Activity Monitor on your Mac
  • Memory Pressure: The Memory Pressure graph helps illustrate the availability of memory resources. The graph moves from right to left and updates at the intervals set in View > Update Frequency. The current state of memory resources is indicated by the color at the right side of the graph:
    • Green: Memory resources are available.
    • Yellow: Memory resources are still available but are being tasked by memory-management processes, such as compression.
    • Red: Memory resources are depleted, and macOS is using your startup drive for memory. To make more RAM available, you can quit one or more apps or install more RAM. This is the most important indicator that your Mac may need more RAM.
Or maybe, to be succinct:
  1. uncompressed
  2. compressed
  3. swapping
 


As I mentioned, I can run a lot of apps with no RAM pressure or constraints, but I'm not using Adobe apps nor Apple "pro" apps nor Microsoft Office, so I'm curious about how they behave and what RAM they demand.
For some reason the fans were ramping up with two browsers open and two mail clients and Finder.

Before I rebooted, the Memory Pressure was all in the green and Swap was about 2 GB. After rebooting, Memory Pressure is still all green, and Swap is now at 937 MB. (On the bright side, the fans are normal now.)
 


Ric Ford

MacInTouch
Before I rebooted, the Memory Pressure was all in the green and Swap was about 2 GB. After rebooting, Memory Pressure is still all green, and Swap is now at 937 MB.
That doesn't seem right, or I'm missing something. If macOS is swapping RAM out to your boot drive (i.e. Swap > 0), I thought Memory Pressure should be showing red (or at least yellow).

I guess I'm missing something, because now I have 189 MB of Swap Used and 106 MB of Compressed memory, but Memory Pressure is low (green), and it only shows 6.75 GB of Memory Used out of a total of 16 GB of Physical Memory.

(So why is it swapping at all? I don't get it.)
 


(So why is it swapping at all? I don't get it.)
Thank you. That was my question. Now that we're talking about the Memory Pressure colors, I don't believe I have ever seen it anything but green. I have to do some FCPX work today and this week. I'll see If I can make the green go away.

On a different, but related point, Logic X really uses a ton of CPU to process effects. It doesn't use a ton of RAM or CPU. If I have too many MIDI tracks (Software Instruments) open with effects like reverb, EQ, compression, etc., the Logic X Project will stop. At that point, I have to bounce some tracks down to audio files or simply hit the Off button for the tracks that I'm not using. That usually solves the problem.
 


Ric Ford

MacInTouch
On a different, but related point, Logic X really uses a ton of CPU to process effects. It doesn't use a ton of RAM or CPU. If I have too many MIDI tracks (Software Instruments) open with effects like reverb, EQ, compression, etc., the Logic X Project will stop. At that point, I have to bounce some tracks down to audio files or simply hit the Off button for the tracks that I'm not using. That usually solves the problem.
I guess you're going to need that 28-core Mac Pro... (or a hackintosh version! :-)
 


That doesn't seem right, or I'm missing something. If macOS is swapping RAM out to your boot drive (i.e. Swap > 0), I thought Memory Pressure should be showing red (or at least yellow).

I guess I'm missing something, because now I have 189 MB of Swap Used and 106 MB of Compressed memory, but Memory Pressure is low (green), and it only shows 6.75 GB of Memory Used out of a total of 16 GB of Physical Memory.

(So why is it swapping at all? I don't get it.)
It may be that memory pressure was high, causing memory to be paged out to swap space, but the pressure later went down (maybe because one or more processes quit or freed memory).

When memory is freed, pages in the swap file are not going to be automatically paged back into RAM. They will remain in the swap file until something actually accesses the memory. And it may be a while until that happens. The page-out algorithm is going to look for the least-recently-used pages, so they are by definition, the least likely to be used.
 


Ric Ford

MacInTouch
It may be that memory pressure was high, causing memory to be paged out to swap space, but the pressure later went down (maybe because one or more processes quit or freed memory).
That's a reasonable theory, but it doesn't seem to fit my situation. I'm running a very consistent collection of software (on this production system), and I never see any signs of memory pressure at all. The only possible explanation I can think of is some kind of system software background tasks going a little wild. In fact, the top two CPU hogs are "kernel_task" and "mds_stores" (i.e. Spotlight). mds_stores is also a gigantic disk hog, reading and writing radically more data than any other tasks. In fact, it must be responsible for most of the wear on my drive. Maybe I should turn the thing off — I just don't know what problems that will cause with other Apple software that depends on it.
 


Another possibility is that macOS is monitoring memory usage and is proactively swapping out memory that hasn't been used for a while, even though there is no need to do so.

The Linux kernel does this, and the behavior can be adjusted by a "swappiness" system parameter. Here are two sources:
In Linux, the kernel tries to avoid having truly free RAM. Free memory is memory that could be used to improve performance somewhere. So a lot (most?) of your "free" RAM is actually used as a disk cache.

When there is no completely free RAM available and a process needs to allocate some, the kernel must decide if it is going to reduce the size of the cache or page-out some process's memory to the swap file. The swappiness configuration tunes this algorithm.

When set to 0 (on kernel version 3.5 or later), the swappiness algorithm is disabled and the old fashioned mechanism of paging/swapping is used. On kernels older than 3.5, this prevents any paging/swapping until available RAM actually runs out. Setting it to 1 enables the swappiness algorithm, but favors reducing cache over paging/swapping until the cache approaches a minimum size.

When set to 100, the kernel aggressively pages/swaps code out of memory in order to keep the disk cache at its maximum size.

The setting that can maximize system performance is going to depend on many factors including the amount of RAM you have, the speed of your storage and the nature of your apps (CPU-intensive, memory-intensive, storage-intensive, interactive, etc.) There really isn't a simple formula for selecting the right amount of swappiness (although some recommend low values around 10-15 for systems with more than 4GB of RAM). If you think this is the cause of a problem, it probably pays to try a variety of values and run benchmarks to see what works best for your system. (FWIW, Ubuntu's default value for swappiness is 60).

I'm sure Apple is not doing the same thing Linux is, but they probably have a mechanism for proactively compressing/swapping pages before it becomes critical to do so. I would love to find out if there are any parameters (like Linux's swappiness) that could be used to tune that algorithm
 


Ric Ford

MacInTouch
Another possibility is that macOS is monitoring memory usage and is proactively swapping out memory that hasn't been used for a while, even though there is no need to do so. The Linux kernel does this, and the behavior can be adjusted by a "swappiness" system parameter....
That's interesting stuff that I didn't know about. I really can't figure out what macOS is doing, since I always see lots of free memory like I'm seeing now, yet there's still a little swap used:
Physical Memory: 16 GB​
Memory Used: 8.78 GB​
Cached Files: 3.38 GB​
Swap Used: 308.8 MB​

I still see stunning Spotlight (mds_stores) demands, even after disabling it for my boot drive and attached backup drives. It has huge CPU time usage, far above normal apps, sitting just below kernel_task and WindowServer, while its disk activity is insanely high, orders of magnitude more than any of my apps and many times what even kernel_task has used. (I keep wondering if Spotlight is what's hitting the swap space.)
 


That's interesting stuff that I didn't know about. I really can't figure out what macOS is doing, since I always see lots of free memory like I'm seeing now, yet there's still a little swap used:
Physical Memory: 16 GB​
Memory Used: 8.78 GB​
Cached Files: 3.38 GB​
Swap Used: 308.8 MB​
...
Two comments: First, the numbers you see are instantaneous values at a moment in time within the last x seconds. However, Swap Used is misleading, because that number generally does not shrink. My understanding (I could be wrong) of OS X's swap space is that it is allocated as needed, reused, but never or rarely deallocated.

Second, the phrase "Swap Used" implies in current use, but it might be better described as "Swap Allocated." In older versions of Activity Monitor, such as in Mac OS X 10.6, the statistic of Page Outs/Ins was far more useful to understanding your memory usage. You can still see it with the command line program top.
 


Ric Ford

MacInTouch
Two comments: First, the numbers you see are instantaneous values at a moment in time within the last x seconds. However, Swap Used is misleading, because that number generally does not shrink. My understanding (I could be wrong) of OS X's swap space is that it is allocated as needed, reused, but never or rarely deallocated.
Actually, I do see Swap Used shrink a little on this 16GB system; it's not constant but has neither grown a lot nor dropped to zero, regardless of typical activities (text editing, browser-based work, Capture One, FileMaker, etc.)
Second, the phrase "Swap Used" implies in current use, but it might be better described as "Swap Allocated." In older versions of Activity Monitor, such as in Mac OS X 10.6, the statistic of Page Outs/Ins was far more useful to understanding your memory usage. You can still see it with the command line program top.
top is interesting when the Terminal window is expanded out wide, showing, for instance, a huge number of page faults for mds_stores. (I notice that you can select to highlight a row and even command-select to highlight multiple, different rows. Control-C will quit once it's running.)

vm_stat is another interesting command-line program; for example, vm_stat 5 displays memory statistics every 5 seconds. (The first line displays the system totals.)
 


top is interesting when the Terminal window is expanded out wide, showing, for instance, a huge number of page faults for mds_stores.
Page faults are a normal part of operation on any computer system with virtual memory. A page fault simply means that there was an attempt to access a valid address not currently backed by RAM. They don't necessarily indicate a problem.

In this particular case, my guess is that mds_stores is using memory-mapped file I/O for its indexing. This uses the mmap call to map a file's contents onto memory addresses. Reading the memory causes the file to be read (via the page-fault/page-in mechanism).

This approach is probably more efficient than the more traditional approach (allocate a memory buffer, load file into buffer, read buffer), since the actual file I/O is handled entirely by the kernel. And the kernel can simply discard the pages (since they're backed by the original file) instead of writing them to the swap file if available RAM starts getting low.

If you're seeing huge numbers of page-in operations and little-to-no page-out operations, then lots of memory-mapped I/O is the most likely explanation.
 


Ric Ford

MacInTouch
Actually, I do see Swap Used shrink a little on this 16GB system; it's not constant but has neither grown a lot nor dropped to zero, regardless of typical activities (text editing, browser-based work, Capture One, FileMaker, etc.)
Surprisingly, Swap Used now sits at 0 bytes after a restart last night, followed by backups and installation of the second Security Update 2019-004 Sierra over the earlier one. After that, and more backups, and typical work (text editing, web, email, FileMaker, database, etc.) here's what I'm seeing this morning:
Physical Memory: 16 GB​
Memory Used: 6.94 GB​
Cached Files: 4.65 GB​
Swap Used: 0 bytes​

One thing that changed: I also had disabled Spotlight on my boot drive. Yet, "mds" processes are still by far the hugest resource hogs, not only CPU time but outrageously excessive storage reads and writes (tens or hundreds of gigabytes), regardless of being turned off for the boot drive!
 


I Googled "mds" and found postings about problems with CPU utilization spikes and fans running wild, going back many years.

A solution mentioned by one poster was to run Onyx, the maintenance utility. Worth a try, I thought. I just ran Onyx (selected the maintenance tab, which cleans caches and other things that I don't fully understand), went through the automatic reboot, and my Firefox memory utilization dropped from 3.9 GB to 1.08 GB (same tabs open), which helps!

So Onyx can be something to try when the "mds", "mdsworker", etc. processes are acting up.

I blame the over-complexity of modern software. When every application and background process is so complicated, the system can go wrong in inexplicable ways. There has to be a clean way to start over - and a plain reboot doesn't always accomplish that, because some ongoing processes have saved, cached, or queued what they are doing and resume the churning upon reboot.
 


Ric Ford

MacInTouch
Well, this is interesting... EtreCheck Pro has some nice analytical graphs, taken from data Apple's collecting with some of the process names "redacted"...
Etresoft said:
Analytics
The analytics window provides a graphical view of system analytics information that is automatically collected by the operating system. This data may include several days worth of information on hardware activity, CPU usage, disk usage, and network usage.

You can turn individual data points on or off to focus on certain areas. Move your mouse pointer over the legend to highlight specific data points.

Use the graph controls to zoom in or out of the chart data. Use the pan (hand) control to click and drag to move the chart. Move your mouse pointer inside the chart to see individual data points.

Analytics information is grouped into three sections:
  • Hardware Information
    Information from various hardware sensors in your machine. See when your machine was sleeping or idle. See your fan speed. Also included are detailed information from SMC sensors. For the SMC sensors, EtreCheck uses data from the VirtualSMC project. Apple does not publish this information so there is no guarantee that the SMC descriptions are accurate.
  • System Information
    Information collected about the operating system itself. This information includes memory pressure, free disk space, swap space used, disk I/O activity, and network I/O activity.
  • Process Information
    Information about individual processes. View processes by memory usage, CPU usage, and energy usage.
 



Amazon disclaimer:
As an Amazon Associate I earn from qualifying purchases.

Latest posts