0

Does anyone know why my macbook pro 15in mid 2015 is no longer using swap memory. I can tell via htop in terminal. Htop

That is the HTOP of my machine. swp is saying 0k/0k. Not sure what to make of it or how to fix it. Just the other day Swp was being used and was around 1GB full with a few more left open.

Any ideas?

3
  • Mine never uses swap until I'm eating maybe ¾ or more of my RAM, & then usually only a few MB. Try running additional processes - a browser with a lot of tabs open, or compress a movie or run a compile - & watch what happens.
    – Tetsujin
    Commented Apr 13, 2020 at 7:43
  • Are you experiencing any actual problem as a result of no swap being currently used? How much total RAM are you using - 5.43G?
    – benwiggy
    Commented Apr 13, 2020 at 7:59
  • I ran a memory intensive task and my comp crashed still showing no swap memory being used. So yes I am currently having issues.
    – Dorilds
    Commented Apr 13, 2020 at 15:00

1 Answer 1

1

The default macOS setup has a dynamic swap size. This means that even though htop displays "0K/0K" it doesn't mean that the total swap capacity is 0, or that swap is disabled. It just means that right now, there's no need for swapping (and that is a good thing).

If later memory usage means that swapping is necessary, the operating system automatically increases swap capacity. This is ofcourse limited by the amount of free disk space on your computer.

7
  • Even when performing high memory tasks no swap memory is actually used.
    – Dorilds
    Commented Apr 13, 2020 at 15:00
  • @Dorilds How much free disk space have you got on the main volume? - Have you changed settings related to swapping? (to your knowledge) ... What kind of high memory task are we talking about? - Some programs explicitly ask the system not to use swap memory for their allocations, so they will not be swapped in any case.
    – jksoegaard
    Commented Apr 13, 2020 at 16:49
  • I ran a video game as my high mem task to try and see if everything was normal and within minutes it crashed. I watched my mem just increase without any swap being used. I have >70GB free disk space on my SSD. And to my knowledge I haven't changed any settings that would relate to swapping.
    – Dorilds
    Commented Apr 13, 2020 at 16:57
  • What crashed - the game or your computer? Can you take a screenshot of Activity Monitor when The memory usage has increased by running the game?
    – jksoegaard
    Commented Apr 13, 2020 at 18:34
  • The whole computer crashed. I'll take one when I try again.
    – Dorilds
    Commented Apr 13, 2020 at 18:39

You must log in to answer this question.

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