Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm typing this on a Macbook M2 max with 32 GB RAM.

Not all that much open and the memory usage is at 27 GB. Chrome, Teams etc. messaging apps, Xcode and other SW dev stuff.

Kinda regret I didn't go for 64 GB.



I wouldn't take this at face value. Modern OSes are great at managing RAM, which means RAM only gets cleared as needed. A lot of that 27 GB can likely be cleared, but the OS finds that there isn't any reason to.


I somehow doubt that. Look at Cached files and subtract that number from Memory used, and tell us please that number.


No "free" command. With "top" command I got this:

MemRegions: 1744370 total, 5771M resident, 234M private, 4726M shared. PhysMem: 31G used (2888M wired, 15G compressor), 74M unused.

A bit confusing even for someone who is comfortable dealing with low level kernel stuff...

I guess I'll need to install Homebrew, MacPorts or something.

Edit vm_stat says this. Looks like more reasonable output:

  % vm_stat
  Mach Virtual Memory Statistics: (page size of 16384 bytes)
  Pages free:                                4070.
  Pages active:                            387530.
  Pages inactive:                          385599.
  Pages speculative:                          241.
  Pages throttled:                              0.
  Pages wired down:                        185222.
  Pages purgeable:                              2.
  "Translation faults":                 458286513.
  Pages copy-on-write:                   18032218.
  Pages zero filled:                    230111374.
  Pages reactivated:                      9982494.
  Pages purged:                           4086524.
  File-backed pages:                       197104.
  Anonymous pages:                         576266.
  Pages stored in compressor:             2007280.
  Pages occupied by compressor:           1062310.
  Decompressions:                         6355861.
  Compressions:                          10204603.
  Pageins:                               13150790.
  Pageouts:                                252630.
  Swapins:                                     52.
  Swapouts:                                 30380.


Better to use Activity Monitor, as simple as that might be.


FWIW, with only Chrome (several windows, multiple tabs, rebooted a few weeks ago) open I'm at:

Physical Memory: 32,00 GB

Memory Used: 21 GB

Cached Files: 10,45 GB

Swap Used: 0 GB


You can look at any number of videos demonstrating that a base model MacBook Air is more than capable of running Chrome with a few tabs open. Modern browsers (and operating systems) opportunistically use free RAM for caching.


SW dev stuff tends to take a lot more RAM than consumer/productivity apps though. I would want at least 16 and ideally 32 for software dev. But for general usage I think that would drop to at least 8 ideally 16.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: