Laptopdog 78

Q: Why is macbook using swap memory while doing nothing?

Hi all,

My daughter has just got a macbook air 2014 1.4 128gb 4gb ram.

I realise these are not power house machines, but are pretty slick, due to the SSD, and hardware/software relationship.

 

What bothers me is that while the computer is doing nothing, and i mean nothing, everything closed down, nothing downloading in the background etc, Activity monitor shows that the memory is using 2.2gb of swap (which i believe means it is needing to use the cpu for support).

 

If she was gaming or something, i would understand, but it is doing nothing!

 

She does game on it a little however, so this is

the reason i started having a look at this is because she plays sims 3, and whilst it plays ok, jesus, the fan goes full steam and the battery is pretty much dead in one hour, even though the games specs fall well within this systems specs.(So she only plays it plugged in now)

 

The sims thing is fair enough though, if that is the work the computer needs to do to run it, but why is the RAM seemingly not coping while the machine is idle?

 

It is a brand new computer by the way.

 

Thanks.

iMac, OS X Mavericks (10.9.2)

Posted on Aug 22, 2014 2:28 PM

Close

Q: Why is macbook using swap memory while doing nothing?

  • All replies
  • Helpful answers

  • by Kappy,Helpful

    Kappy Kappy Aug 22, 2014 2:32 PM in response to Laptopdog 78
    Level 10 (271,860 points)
    Desktops
    Aug 22, 2014 2:32 PM in response to Laptopdog 78

    That is not an instantaneous number but a cumulative one. The OS is always using swap space as it moves date into and out of memory. The more swap space the system is using may mean it is running out of available memory. If the computer only has 2 or 4 GBs of RAM, consider adding more RAM.

     

    About OS X Memory Management and Usage

     

    Using Activity Monitor to read System Memory & determine how much RAM is used

    OS X Mavericks- About Activity Monitor

     

    Understanding top output in the Terminal

     

    The amount of available RAM for applications is the sum of Free RAM and Inactive RAM. This will change as applications are opened and closed or change from active to inactive status. The Swap figure represents an estimate of the total amount of swap space required for VM if used, but does not necessarily indicate the actual size of the existing swap file. If you are really in need of more RAM that would be indicated by how frequently the system uses VM. If you open the Terminal and run the top command at the prompt you will find information reported on Pageins () and Pageouts (). Pageouts () is the important figure. If the value in the parentheses is 0 (zero) then OS X is not making instantaneous use of VM which means you have adequate physical RAM for the system with the applications you have loaded. If the figure in parentheses is running positive and your hard drive is constantly being used (thrashing) then you need more physical RAM.

     

    Adding RAM only makes it possible to run more programs concurrently.  It doesn't speed up the computer nor make games run faster.  What it can do is prevent the system from having to use disk-based VM when it runs out of RAM because you are trying to run too many applications concurrently or using applications that are extremely RAM dependent.  It will improve the performance of applications that run mostly in RAM or when loading programs.

  • by Linc Davis,Helpful

    Linc Davis Linc Davis Aug 22, 2014 3:03 PM in response to Laptopdog 78
    Level 10 (208,044 points)
    Applications
    Aug 22, 2014 3:03 PM in response to Laptopdog 78

    There is excessive swapping of data between physical memory (that is, the memory chips on the logic board) and virtual memory (one or more files on the startup volume.) That activity is relatively slow and causes the whole system to be less responsive. It can happen for two reasons:

              A long-running process with a memory leak (a kind of bug)

              Not enough memory for your usage pattern

    Tracking down a memory leak can be difficult, and it may come down to a process of elimination.

    These instructions are for OS X 10.9 ("Mavericks.") The procedure may be slightly different for earlier versions of OS X.

    When you notice the swap activity, open the Activity Monitor application and select All Processes from the View menu, if it's not already selected. Select the Memory tab. Click the heading of the Real Mem column in the process table twice to sort the table with the highest value at the top. If you don't see that column, select

              View ▹ Columns ▹ Real Memory

    from the menu bar.

    If one process (excluding "kernel_task") is using much more memory than all the others, that could be an indication of a leak. A better indication would be a process that continually grabs more and more real memory over time without ever releasing it. Here is an example of how it's done.

    The processes named "Safari Web Content" render web pages for Safari. They use a lot of memory and may leak if certain Safari extensions or third-party web plugins are installed. Consider them prime suspects.

    Another process often implicated in memory leaks is "inkjet4" or "inkjet8," which is a component of the HP printing software. If it's present, force-quit the process in Activity Monitor to solve the problem temporarily. Empty the print queues in the Printers & Scanners preference pane (which has a slightly different name in each recent version of OS X.) If you don't use an HP printer, remove the software. Otherwise, if the problem is recurrent, update the software (which may not help) or contact HP support.

    "Wired" memory should be a small part of the total. That memory is not swapped, but it makes less physical memory available which may then result in swapping. If you have a lot of wired memory, that's usually an indication of a memory leak in a third-party program that modifies the operating system at a low level. Ask for guidance in that case.

    Obviously, you can't install more memory in that model. What you can do is run fewer programs simultaneously.

  • by Laptopdog 78,

    Laptopdog 78 Laptopdog 78 Aug 24, 2014 12:17 PM in response to Linc Davis
    Level 1 (64 points)
    Apple TV
    Aug 24, 2014 12:17 PM in response to Linc Davis

    Thank you both for this info.

     

    I need to have a good play around with the mac in question and will report back with my findings.

     

    I said 2.2gb of swap was being used although i now believe it is much less than that, but it is constantly being used like i said, with not a jot of anything else being open or used.

     

    As Linc has said, you can't add memory to this model, although i don't believe i need to for its intended use. I just would not have thought swap would be used whilst nothing is open.

     

    Anyway i'll have a play around with the advice given.

     

    Thanks again.