Home
Posted By: ryck RAM 6GB or 4GB - 03/22/14 05:23 PM
I need to upgrade my RAM (Early 2008 1Mac 8,1, 2.66 GHz Intel Core 2 Duo) and it seems I can go 4GB with matched RAM or 6GB with a 2GB and a 4GB.

My guess is that 4GB will be just fine for me but it is tempting to think about 6. However, having always heard that RAM should be matched, I assume that although the 6 should work, there must be some downside.

Am I guessing, or worrying too much?
Posted By: dkmarsh Re: RAM 6GB or 4GB - 03/22/14 09:59 PM

Why not install a matched pair of 4 GB modules? Not sure why OWC doesn't list that possibility.
Posted By: artie505 Re: RAM 6GB or 4GB - 03/22/14 10:19 PM
Per Mactracker, ryck's iMac maxes out at 6GB.
Posted By: ryck Re: RAM 6GB or 4GB - 03/23/14 02:14 AM
Originally Posted By: dkmarsh

Why not install a matched pair of 4 GB modules? Not sure why OWC doesn't list that possibility.

I am leaning toward the matched pair (OWC does have them) but apparently I can also go to 6GB, which is tempting IF there's a real advantage. However, if it's marginal and has the potential for other headaches.........
Posted By: ryck Re: RAM 6GB or 4GB - 03/23/14 10:14 AM
Originally Posted By: dkmarsh
Why not install a matched pair of 4 GB modules? Not sure why OWC doesn't list that possibility.

Originally Posted By: artie505
Per Mactracker, ryck's iMac maxes out at 6GB.

Originally Posted By: ryck
I am leaning toward the matched pair (OWC does have them) but...

And, the penny has finally dropped over here…..I was leaning toward matched pair to get 4GB but misread DK's recommendation. No, OWC doesn't have them and artie is right.

I have decided on 4GB altogether as two matched 2GB modules. I did hear an explanation, which I don't quite understand, that 6GB will work but I the machine ends up working in a fashion it's not designed for….. relative to the 2 Cores. The term "brute force" was used and I figure it's likely better to have things work in the manner they were intended.
Posted By: alternaut Re: RAM 6GB or 4GB - 03/23/14 11:25 AM
Intel iMacs can use both matched and unmatched RAM without problem. Unless matched RAM is specifically recommended by Apple (and I believe in this case it's not), there's little advantage to matching RAM. While early estimates claimed a benefit of matched RAM (when recommended) of up to 6-8%, they also stated that more (and unmatched) RAM outperforms matched RAM in RAM-intensive tasks like working with Photoshop, audio and video apps, or virtualization. This remains true. Later tests found that even if there is support for interleaving (as this iMac has), the advantage of matching tends to be negligible, in the order of less than 0.5%.

So I'd follow the adage that more RAM trumps matched RAM, and max out your RAM.
Posted By: artie505 Re: RAM 6GB or 4GB - 03/23/14 05:14 PM
Crucial doesn't offer a 4GB DIMM for your iMac...a 4GB total upgrade is the most they offer.

It may pay you to contact them and find out why.

Edit: I suspect that they only offer what Apple's specs call for.
Posted By: ryck Re: RAM 6GB or 4GB - 03/23/14 07:02 PM
Originally Posted By: alternaut
Intel iMacs can use both matched and unmatched RAM without problem. Unless matched RAM is specifically recommended by Apple (and I believe in this case it's not), there's little advantage to matching RAM.

What does "matched" mean? I've been assuming that it meant two boards with equal amounts of RAM. i.e. A 2GB and another 2GB are "matched".

However, the OWC site refers to their 6.0GB Memory Upgrade Kit as "2GB + 4GB Matched SO-DIMMs PC6400 DDR2 800MHz".
Posted By: ryck Re: RAM 6GB or 4GB - 03/23/14 07:05 PM
Originally Posted By: artie505
Crucial doesn't offer a 4GB DIMM for your iMac...a 4GB total upgrade is the most they offer.

I suspect that they only offer what Apple's specs call for.

Or, maybe there's not a big market for 6GB. I notice that moving from 4GB to 6GB is more than double the cost.
Posted By: artie505 Re: RAM 6GB or 4GB - 03/23/14 08:30 PM
I was wondering whether they got some sort of negative feedback that made them stop selling the 4GB DIMMS.
Posted By: alternaut Re: RAM 6GB or 4GB - 03/23/14 11:23 PM
Originally Posted By: ryck
What does "matched" mean? I've been assuming that it meant two boards with equal amounts of RAM. i.e. A 2GB and another 2GB are "matched".

The term 'matched' means different things in the 2+2 vs the 2+4 case. Matched RAM as required for interleaving refers to identically specced DIMMs of the same size, just as you assumed. In contrast, the 2+4 case refers to identically specced DIMMs of different size. The latter won't support interleaving and the slight speed advantage associated with it, but that lack may be (more than) compensated for by the additional RAM when that's needed, because no or less paging to disk will be required.
Posted By: tacit Re: RAM 6GB or 4GB - 03/24/14 09:51 PM
Putting 6 GB of RAM in that machine does not "brute force" anything and has nothing to do with the processor; you're not "using the cores" in an unintended way or anything like that.

How much RAM do you need? Depends on what you do. If you do things that use a lot of RAM, more is (obviously) better.

A lot of folks think "I don't need a lot of memory, I only use my computer for email and Web browsing," but in fact Web browsing can guzzle prodigious amounts of memory, depending on where you go and what you do.

One way to see if your computer could benefit from more RAM is to see if it's using your hard drive as virtual memory. Open a Terminal window and type

top

and press the Return key. You'll see your Terminal window fill with a bunch of stuff. Don't be intimidated; you're only interested in the top few lines, which will look something like this:

Processes: 236 total, 2 running, 6 stuck, 228 sleeping, 1437 threads 15:47:49
Load Avg: 2.83, 2.73, 3.07 CPU usage: 9.45% user, 5.47% sys, 85.6% idle SharedLibs: 11M resident, 14M data, 0B linkedit. MemRegions: 85850 total, 4439M resident, 216M private, 1756M shared.
PhysMem: 13G used (1590M wired), 2635M unused. VM: 501G vsize, 1059M framework vsize, 0(0) swapins, 0(0) swapouts. Networks: packets: 2596935/1697M in, 3290283/1770M out. Disks: 502757/17G read, 1066261/13G written.

The part you care about is the part where it says 0(0) swapouts. Swapouts are pages of information that won't fit into memory, so your computer is using the hard disk as virtual memory. If this number isn't 0, yourcomputer will slow down. If this number is big, your computer will slow down a lot and can benefit from more RAM.

When you're done looking at the information, hold down the Control (NOT the Command) key and press the letter C to terminate the top command.
Posted By: grelber Re: RAM 6GB or 4GB - 03/24/14 11:12 PM
Or you can just use Activity Monitor to follow system memory (and other) use — not as comprehensive but immediate access.
Posted By: artie505 Re: RAM 6GB or 4GB - 03/25/14 12:19 AM
Or MemoryStick (freeware) for in-your-face info.
Posted By: ryck Re: RAM 6GB or 4GB - 03/26/14 10:34 AM
Originally Posted By: tacit
One way to see if your computer could benefit from more RAM is to see if it's using your hard drive as virtual memory. Open a Terminal window and type

top

and press the Return key. You'll see your Terminal window fill with a bunch of stuff. Don't be intimidated; you're only interested in the top few lines, which will look something like this:

Processes: 236 total, 2 running, 6 stuck, 228 sleeping, 1437 threads 15:47:49
Load Avg: 2.83, 2.73, 3.07 CPU usage: 9.45% user, 5.47% sys, 85.6% idle SharedLibs: 11M resident, 14M data, 0B linkedit. MemRegions: 85850 total, 4439M resident, 216M private, 1756M shared.
PhysMem: 13G used (1590M wired), 2635M unused. VM: 501G vsize, 1059M framework vsize, 0(0) swapins, 0(0) swapouts. Networks: packets: 2596935/1697M in, 3290283/1770M out. Disks: 502757/17G read, 1066261/13G written.

The part you care about is the part where it says 0(0) swapouts. Swapouts are pages of information that won't fit into memory, so your computer is using the hard disk as virtual memory. If this number isn't 0, yourcomputer will slow down. If this number is big, your computer will slow down a lot and can benefit from more RAM.

When you're done looking at the information, hold down the Control (NOT the Command) key and press the letter C to terminate the top command.

Thanks for a great explanation and thanks for the above tip. It works great. My version of Terminal uses "0(0) pageins, 0(0) page outs". As I have said before, FineTunedMac is always the best place to pose a question.
Posted By: jchuzi Re: RAM 6GB or 4GB - 05/10/14 06:51 PM
For anyone else who is contemplating adding RAM, Tips for upgrading your Mac’s RAM has some good thoughts.
Posted By: joemikeb Re: RAM 6GB or 4GB - 05/10/14 08:32 PM
For any of you who are using Mavericks, it is important to note that its memory management is very different than that used in previous versions of OS X and hard won knowledge in those versions can be misleading or even wrong in Mavericks. One thing that causes new Mavericks users consternation is Mavericks memory management works hard to keep the RAM memory chock-a-block full. The idea being that even if an application in RAM is not currently being used, it may well be used again soon so the RAM it occupies is compressed to make room for other applications that are running and need the RAM. Compressing or decompressing the RAM takes only a small fraction of the time required to push data to the Swapfiles.

In Mavericks Activity Monitor, there is a horizontal box at the bottom of the window labeled Memory Pressure. If it is green you have all the RAM you need, if it turns yellow the system is pushing the limits of the existing RAM, but when it turns red you either need to shut down some running applications or add more memory. Actually it is a lot simpler than previous OS X VM management iterations in addition to offering noticeable VM performance improvements.
Posted By: tacit Re: RAM 6GB or 4GB - 05/10/14 09:06 PM
Previous versions of Mac OS X have also not cleared RAM when a program quits, on the hypothesis that it might be needed again. This memory is called "inactive" if you look at it with a tool like iStat.

With Mavericks, the idea that if you're seeing pageouts, you could benefit from more physical memory still holds true.
Posted By: dkmarsh Re: RAM 6GB or 4GB - 05/10/14 09:53 PM

Quote:
For any of you who are using Mavericks, it is important to note that its memory management is very different than that used in previous versions of OS X...

Case in point: my Mac mini, with the factory 4GB of RAM, routinely reached 9 swap files when I was running Mountain Lion; it now settles in at 3 swap files in Mavericks.
Posted By: joemikeb Re: RAM 6GB or 4GB - 05/11/14 03:35 PM
Originally Posted By: dkmarsh
Case in point: my Mac mini, with the factory 4GB of RAM, routinely reached 9 swap files when I was running Mountain Lion; it now settles in at 3 swap files in Mavericks.

I have 16 GB on my Mac mini and the most swapfiles I have seen is two, but that was with half a dozen Filemaker databases open. Often I have no swapfiles.
Posted By: tacit Re: RAM 6GB or 4GB - 05/11/14 07:29 PM
Mavericks will try to do in-RAM compression before it creates swapfiles, so it's common to see fewer swapfiles in Mavericks. The presence of the swapfiles, however, still indicates the computer has exhausted physical RAM and is reverting to virtual memory. As supercomputer legend Seymour Cray has said, memory is like sex--it's better when it's real.
Posted By: dkmarsh Re: RAM 6GB or 4GB - 05/11/14 09:18 PM

Quote:
The presence of the swapfiles, however, still indicates the computer has exhausted physical RAM and is reverting to virtual memory.

I don't think that's necessarily the case.

When I boot, there are two swap files created immediately (not three; the script I use to count them hasn't been updated to reflect the presence of sleepimage in /var/vm). Yet Activity Monitor shows no swap used. It seems as if maybe the files are created as placeholders, against the possibility of eventual use. Perhaps this is dependent on installed RAM, which would explain why joemikeb doesn't get any swap files on boot.
Posted By: artie505 Re: RAM 6GB or 4GB - 05/12/14 09:37 AM
I've posted twice on this subject and gotten no response, but since we're touching on my exact question, I'll try again…

Before I upgraded the RAM in my April 2010 15" MacBook Pro/2.66GHz/Core i7/8GB RAM/OS X 10.6.8 (Build 10K549) from 4GB to 8GB, swap files would be created under what always seemed to be pretty odd circumstances, i.e. when I was either doing audio editing with Fission (most common), updating a CCC clone, or launching Safari with two or three multi-imaged eBay pages, but, without fail, when MemoryStick showed more than 50% of my memory as free, and no page-outs, and Activity Monitor showed "Swap used: 0 bytes". (I'd boot to one swap file, and see mostly one, but occasionally two, more created, but since I upgraded, I boot to one and stay there.)

The traditional wisdom that swap files are created when all available RAM has been used appears to be fallacious.
Posted By: joemikeb Re: RAM 6GB or 4GB - 05/12/14 03:35 PM
The over simplified explanations of virtual memory found all over the place are accurate as far as they go. What the almost invariably leave out is a full explanation of memory usage in a modern operating system such as Unix, Linux, OS X, and even Windows. I spent nearly a semester in graduate school learning the bits parts and pieces of this and at least another semester integrating it into a coherent concept. Later as an adjunct professor I struggled to explain the concepts to undergraduate graduate students. Suffice it to say I am giving you the highly compressed, essential concepts only version.

At the application layer in a computer, ALL MEMORY IS VIRTUAL. When an application is launched it requests a given amount of address space and that address space always begins at address location 0000. So the OS and every running application have the same 0000 starting address. OS X then takes over and maps those virtual address locations to physical locations in the computer. The first addresses are going to be in wired RAM and serve as a communication and control link between OS X and the particular task. Depending on the needs of the individual application additional Virtual addresses will be mapped to:
  • RAM
  • applicaton files on the hard drive
  • data files on the hard drive
  • Application Program Interface APIs either in RAM or on the hard drive
  • common resources such as font files on the hard drive
  • Swapfiles on the hard drive (whether they are actually used or not)

As the program executes, its requirements are continually changing, as are the available resources due to the exception of other tasks in the system. Again it is the OS that takes responsibility for managing where the addresses are mapped and moving data as needed. Theoretically only data and variables should ever be rolled out to the swapfiles because everything else is a constant already on the hard drive and can be read/reloaded from the original location. How much address space is mapped to the swapfile(s) depends on the memory management algorithms in the OS, and the actual requirements of the programs.

Of course this explanation is greatly simplified because I chose to ignore all the remapping that takes place in RAM as well as the additional complexity added by RAM compression in Mavericks.

So hopefully in answer to your question, the OS may elect to map a portion of the virtual address space requested by an application to the swapfile to speed up the initial page out when required. How much of this virtual address space is mapped to the swapfiles is dependent on the memory allocation algorithms in the OS and to how the application code is written. It does appear from practical experience, later versions of OS X are being more frugal with swapfiles and mapping less swapfile space until it is actually required.
Posted By: tacit Re: RAM 6GB or 4GB - 05/13/14 02:07 AM
There's a difference, it would seem, between swap files being created, and swap files being used.

Some *nix systems immediately create a swap file that's the same size as installed RAM on boot, even if it isn't used. I'm not quite sure what the logic of that is.

The most relevant figure, which you can see with tools like top or MemMeter, is not swap files per se, but pageouts. If the number of pageouts isn't 0, the system is in fact using that virtual memory.

Right now, I have one swap file that's 1 GB in size, but it's not being used; I'm showing 0 pageouts. My laptop has 16 GB of memory, of which 1.45 GB is free and 5.75 GB is inactive (meaning it can be used if necessary).
Posted By: artie505 Re: RAM 6GB or 4GB - 05/18/14 09:26 AM
Sorry for being slow to respond, but it took some reading, re-reading, and digesting of your excellent post to get to this point.

I appreciate your clearing up at least some of the mystery about RAM, swap files, and their interaction, and while I'm not certain that I've reached the "By George…" stage, I do think I've got it, and that these lines sum the issue up:

Originally Posted By: joemikeb
Depending on the needs of the individual application additional Virtual addresses will be mapped to … Swapfiles on the hard drive (whether they are actually used or not) (Emphasis added)

How much address space is mapped to the swapfile(s) depends on the memory management algorithms in the OS, and the actual requirements of the programs.

…the OS may elect to map a portion of the virtual address space requested by an application to the swapfile to speed up the initial page out when required. How much of this virtual address space is mapped to the swapfiles is dependent on the memory allocation algorithms in the OS and to how the application code is written.

Or, to put it in terms of my experience,
  • swapfile0…created at boot is OS X's default anticipation that swap space may be required and that xMB is a reasonable starting point.
  • What was happening in my examples is that OS X/the programs in question/both anticipated a greater need than swapfile0 allowed for and created swapfile1 against the possibility.
  • Since I've maxed out my RAM, the additional real memory has negated at least part of the potential need for virtual memory, so swapfile1 is no longer created.
I think, i.e. hope, that-all's more or less on the mark.

I'm wondering, though, whether your

Originally Posted By: joemikeb
It does appear from practical experience, later versions of OS X are being more frugal with swapfiles and mapping less swapfile space until it is actually required.

is contradicted by tacit's

Originally Posted By: tacit
Right now, I have one swap file that's 1 GB in size….

because swapfile0 in OS X 10.6.8 is only 67.1MB. (I'm assuming that tacit's file is swapfile0 in OS X 10.9.x.)?
© FineTunedMac