logo

Home page
Articles for Windows, Linux, OS X
Mac tips and articles
Mac tips
Windows 8 tips and articles
Windows 7 tips and articles
Vista Tips
XP Tips
Linux tips and articles
Read the blog
Online store
Windows, Linux, OS X programs
Links
About

Mac hints and tips

Tips index

Mac memory explained

The amount of memory that is installed in your Mac can have quite a large impact on its performance and it is important that you monitor how it is being used. You need to know how much you have, how much is being used at any time, and how much is free. The reason is that if you have too little memory free then OS X will waste a lot of time accessing the disk when it could be running whatever application you are using. Disk drives are very slow and when they are used a lot an application will slow right down.

So what's the disk drive got to do with memory? No matter how much RAM you have installed in your computer it might not be sufficient for a very demanding application. In order to cope with every eventuallity the operating system uses the hard disk drive as an extension of memory.

This means that if you only have 1Gb of RAM installed in your Mac, this isn't the absolute limit for OS X and your applications and you can continue to work even when the total memory requirement for OS X, applications and data rises above 1Gb. When more memory is required than is physically intalled OS X will use free space on the hard disk drive as an extension. It's like having several gigabytes more memory than you actually have available and it's called virtual memory.

This means that data and even applications can exist in memory that doesn't physically exist - they are actually stored on the hard disk drive rather than in real memory. When the data or application needs to be accessed, OS X will clear some part of real memory by temporarily saving it to disk and then the free space can be used to load the application or data that's needed. It enables you to carry on working even when the memory requirement is greater than the physical memory installed, which is a huge advantage, but it results in a large amount of disk activity and disk drives are many times slower to access than memory.

It is best to avoid exceeding the amount of physical memory that is installed and this keeps virtual memory usage, which is very slow, to a minimum. It is not possible to completely stop all virtual memory usage because this functionality is simply part of the operating system, but by ensuring that the amount of free memory is always sufficient to run your applications then it will hardly be used at all and they will run faster. You need to know how much memory is being used, how much is free and whether the hard disk drive is being over used as an extension to physical memory.

Apple Mac memory monitorOK, you're convinced that memory is important and that you need to know how much is being used, how much is free, and whether you are running short. How do you do this? It is actually very easy and there's a tool that will show you everything you need to know. Click Go, Utilities on the Finder menu and double click Activity Monitor.

This is a multi-purpose tool for examining a variety of system attributes, but here we are just interested in the memory usage, so select the System Memoey tab at the bottom. You will see several different attributes, such as Free, Wired, Active, Inactive, Used, VM size, Swap used and a pie chart.

You may be wondering what all these values mean and whether they are important. Surely you can simply look at the free and used values to see how much memory that is being used or is free? The situation is a bit more complicated than that and if you add the free and used amounts it will come to less than the total memory in the Mac. What's going on?

The total memory in the Mac is the sum of the free, wired, active, inactive and used values. Here's what they mean:

  • Free: This is the amount of memory that is free. In other words, not being used and has not recently been used.
  • Wired: The disk drive is used as an extension to physical memory and OS X can make space in RAM by temporarily storing data and programs to disk. Some programs and data are in constant use and the system would slow to a crawl if they were stored on disk and then read back every time they were needed. Memory that is in constant use is called wired and OS X will not store it on disk.
  • Active: This is memory that is currently being used by applications or OS X. In theory it could be temporarily written to disk in order to free up some RAM for another application, but it's best avoided.
  • Inactive: This is memory that was recently used, but is no longer in use. For example, if an application uses a chunk of RAM then discards it, the RAM it occupied is added to the inactive pool. If the application needs the chunk of memory again then its status is changed to active. Inactive memory can be used by any application that needs memory and it's similar to free memory.

As you use your Mac, memory will be used by the various applications you run and when they quit the memory will be marked as inactive because it was recently used. This means thay the free memory can fall to quite a low value. However, this is nothing to be concerned about and the only time the free value is at its maximum is just after you have switched on and before you have run any applications. The inactive memory can reach quite a high value and again this is nothing to worry about because it is available to any application that needs it.

The figure you should monitor is the free+inactive total. This is what is available to OS X and any applications you want to run. If this total is too small, you need to buy more RAM for your Mac because it won't be running at its maximum speed. Excessive disk thrashing will severely slow it down.

If you are buying a new Mac you can specify the amount of memory it is to have. For example, a 20in iMac comes with 1Gb of RAM as standard, but when you visit the Apple Store to buy one you will see options to increase this to 2Gb or 4Gb. The same is true of MacBooks too. So how much memory should you specify?

Actually, it is best to get the minimum amount of memory in your new Mac or MacBook. Why? Because Apple charges four times the price of other memory suppliers. Increasing the RAM from 1Gb to 2Gb costs an extra 50 at the Apple UK store, but memory suppliers like Crucial only charge 12 per Gb, so you can actually buy 4Gb for less than what Apple charges for just 1Gb extra over the base spec. Upgrading the RAM isn't that difficult and anyone with reasonable DIY skills can manage it. You'll save a lot of money doing it yourself.

Tips index



copyright