0

I have an early 2015 MacBook Pro equipped with 16 GB RAM. The computer however appears to be never using more than 8 GB. This is a screenshot of htop with the computer under heavy load (Large postgres GIST index building):

htop screenshot

Mac system params look good:

enter image description here

I'd appreciate if anyone has a clue as to what is going on. I am running macOS Mojave, but the problem has existed ever since I bought the computer.

  • Welcome to Ask Different :) It could very well be a problem with postgres than the hardware. A quick web search reveals this: dba.stackexchange.com/questions/111195/… – Nimesh Neema Jun 23 at 15:40
  • 4
    Install Chrome and see if it changes. – Thorbjørn Ravn Andersen Jun 23 at 15:55
  • What does Activity Monitor show? – benwiggy Jun 23 at 16:58
  • I have a better question... why do you think it should be using more than 8gb of RAM? – Marc Wilson Jun 23 at 17:07
  • what do you consider as a heavy load? Try opening several large apps and see what happens. If you are running one app doing a lot it may not need much memory just cpu cycles. – jmh Jun 23 at 21:05
3

There is no problem. Your computer is working as intended.

A computer does not “run faster” by using more memory. Memory is only used (allocated) when programs ask for memory. If they don’t ask for it, it’s not used. This is the preferred behavior as it makes your computer run faster and use less power without sacrificing anything really.

There’s no “8 GB limit” in Mojave, nor in your MacBook Pro hardware.

If you want to simulate program that is asking for lots of memory, then open the Terminal and run this command:

perl -E 'my $x = "abcd1234" x 500000000; sleep(30);'

It should allocate lots of memory and hold it for 30 seconds, and then give it back.

You should be able to see it in Activity Monitor allocating ~8 GB of RAM. If you want to allocate more/less, then change the number "500000000" accordingly.

  • This. I thought the comment above to try installing chrome was funny. – FiddleDeDee Jun 24 at 10:30
  • Thanks for your reply, makes a lot of sense. The thing that makes me keep scratching my head is why I usually see the memory consumption circa 8Gb and never ever passing that mark. I'll ask differently. How could I test that, upon request, the system will indeed make use of the 16Gb. – c99 Jun 24 at 17:16
  • @c99 I have updated the answer with how to simulate large memory usage. – jksoegaard Jun 25 at 9:35
  • @jksoegaard As you said, the computer works fine. Activity monitor does show how perl takes/reserves the memory. Thanks for your help and your replies. – c99 Jun 25 at 14:28
  • @c99 Good to hear :-) Please mark the answer as accepted if it helped you! – jksoegaard Jun 25 at 16:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .