Swap constantly grows - but why?

Hello.
I've noticed that my system constantly makes the swapfile bigger but I don't quite understand why…
MacBook-Pro:~ alex$ du -sch /private/var/vm/swapfile*
64M /private/var/vm/swapfile0
64M /private/var/vm/swapfile1
128M /private/var/vm/swapfile2
256M /private/var/vm/swapfile3
512M /private/var/vm/swapfile4
512M /private/var/vm/swapfile5
512M /private/var/vm/swapfile6
512M /private/var/vm/swapfile7
512M /private/var/vm/swapfile8
512M /private/var/vm/swapfile9
3,5G total
If I sum up the amount of the physical memory shown by activity monitor, I end up with about 2.4 GB. I've got 4 GB RAM. Why is any Swap used at all in this case? And even more important: Why does it keep on growing?
!http://i.pgu.me/Vsava6Fi_original.png!
Thanks,
Alexander

Because between the time you booted your Mac and when you look at /var/vm,
you ran applications that wanted more memory than you have phyical RAM.
And looking at your resident RAM usage is meaningless with respect to swap usage.
There is no easy way to figure out what is in swap.
Virtual memory is filled with empty holes, so that cannot be used
to measure swap usage.
And both virtual and resident RAM may be counting shared library code
so there may be double (or greater) counting of the same physical RAM page.
If you have 3.5GB of swap, it is because you peaked out at needing 3.5GB
of swap.
The more important question is, are you seeing a performance issue due
to swapping?
I like to start a Terminal session and run the following command:
sar -g 60 100
which will show pageout activity once per minute for 100 minutes
(adjust values to suit your tastes).
When you see jumps in pageout activity, you can cross reference
that against what you are currently doing.
Web browsers can be memory intensive depending on what web sites
you visit. Also photo and movie editors are very memory intensive.

Similar Messages

  • Large swap file (900MB), but no pageouts

    My MacBook Air 13" with 4GB of RAM accumulates a large swap file over time, but pageouts are 0 (page ins: 1.1million). Anyone know why? Is it possible to see which process/application currently have pages stored in the swap file?

    Sorry to dig this old thread up, but I am seeing an identical behavior to the original poster, and I just wanted to say—you did an excellent job of explaining how page ins can be very large with no pageouts, but I don't think this explains the real mystery, which is that there is a large amount of swap space, and a large amount the system says is used, but there are no page outs. You have not explained how a swap file gan grow in usage with no page outs, and if I understand things correctly, this should not be possible.
    I'm having the same issue on my new MacBook Pro with Retina display. I have 16GB of RAM and for the most part I don't use more than 4-6GB of that—I bought it for the occasional times I need to do a lot of VM testing, but I haven't needed to do that yet. I consistently see my swap usage grow to be as large as 2-3GB with a total size for all the swapfiles in /var/vm being 3-4GB.
    I don't need the space, and the system isn't slow or anything. I just want to know how this is possible. I have been using Mac OS X for 10 years now, and working on linux servers for 5 years or so. I've never seen swap usage be more than 0KB when there are no page outs.
    I've attached some screenshots of what I am seeing:
    Screen capture from Activity Monitor.
    Screen capture from Terminal executing 'du -hsc /var/vm/swapfile*' to tally the total size of the swapfiles.
    I should note that it tends to take a day or two of use to start to see this, in a series of sleep cycles here and there. I put my laptop to sleep at night as well as to and from work, etc. It probably sleeps/wakes 5-7 times a day in all. I tend to notice that the usage creeps up, starting atound 50 MB, then I will notice it being a few hundred some time later. It really makes me wonder if this has to do with some kind of discrete vs. dedicated graphics switching or something, perhaps a very low level operation that is somehow avoiding getting counted by the system's resource tracking facilities. I have no idea, but I would love it if there were someone out there who could explain it or point me in the right direction.
    Thanks for your time.

  • I have a 2011 Macbook Pro 15" Snow Leopard Quadcore icore 7 with 8Gb of RAM and Im a Webpage Graphic Designer but why is my Macbookpro is so slow!?

    I have a 2011 Macbook Pro 15" Snow Leopard Quadcore icore 7 with 8Gb of RAM and Im a Webpage Graphic Designer but why is my Macbookpro is so slow!?
    I'm opening like Skype, AIM, Chrome the Memory Hog, Adobe Photshop and Illustrator...  Its so slow! I tried Onyx, CleanMyMac, iFreeMemory or just purging  but still i still have to restart to get it back to normal after closing all the applications... im not really impressed with the memory swapping thing,Even though my inactive RAM is like 2GB its so SloW! Anyone knows how to fix this problem?

    It's hard to say why your machine is slow, but that machine with 8 GB of RAM should not be slow.  Could be any number of possible problems.  Try taking a look at the Mac OS X Speed FAQ.

  • I called apple tech support cause my iphone 5 charger just stopped working. Aplle tech support said they can send me a new charger but why do they need credit card information if i have only had the the charger for 2 months and i have 1 year warranty?

    I called apple support because my iphone 5 charger stopped working and they said they would send me a new charger but why do they need credit card information if every apple product has 1 year warranty?

    Hi CryyCorr33
    Sound like they did what is called an express replacment. What apple does is they put a hold on your Credit Card for the amount of the cord because they are sending you the cord first. Then, once you receive the new cord in about 2-3 days, you'll put the defective cord in the box and ship it back out and when they receieve the defective one, they'll be able to remove that hold from you card.
    I believe the reason behind the hold on your card is incase you don't return your defective one to them so they can find out the cause of the issue.
    An Apple Retail Store could swap them out for you in store incase you happen to be near one. This requires no hold.
    Hope this helps

  • Constantly growing

    How to see the growing file in the size?
    We wanted to monitor files which are growing rapidly.
    Currently we are using following logic to check the status of the large file (from cron job)
    45 6,14,22 * * * ( date ; find /opt -size +10000 ) >> /home/dn/LargeFile.log 2>&1Once our opt file system reaches over 90 % we receives LargeFile.log and messages via email.
    This is done by code.
    But I would like to see the files which are constantly growing.
    Also wanted to see top 10 large files existed in the FileSystem.
    thx
    D

    To see size differences in time, you need lists of files and their sizes, in different points in time.
    To find the top 10 largest files in the /opt filesystem:
    find /opt -type f -exec du -sm {} \; | sort -n | tail -10

  • How can i fix my iphone i can't update or download apps, when i try it tells me toput my credit card info and i do but when i push done it tells me my payment has been declined, but why do i have to pay to update or download free apps. How can i fix this?

    how can i fix my iphone i can't update or download apps, when i try it tells me toput my credit card info and i do but when i push done it tells me my payment has been declined, but why do i have to pay to update or download free apps. How can i fix this?

    You must contact iTunes support to get the problem resolved.
    http://www.apple.com/support/itunes/contact/
    If there is a problem with your account or payment info, you cannot
    download anything (including free apps or updates) until the matter
    is resolved.
    In countries where the iTunes Store only sells apps, the accepted payment methods are Visa, MasterCard, and American Express. Other payment types such as gift cards, store credit, monthly allowances, ClickandBuy, and PayPal are not accepted. Depending on your App Store country, prices may be listed in your local currency, US Dollars, or Euros.    http://support.apple.com/kb/HT5552

  • My ipod touch is stuck on the apple logo and after a while a white screen comes up and it restarts and the same thing all over agan. this happened to me before and after a while it turns on but why does it keep on doing this?

    my ipod touch is stuck on the apple logo and after a while a white screen comes up and it restarts and the same thing all over agan. this happened to me before and after a while it turns on but why does it keep on doing this?

    Try connecting the iPod Touch to your computer and restore it.  http://support.apple.com/kb/HT1414

  • Keynote and pages are now free, but why do i need to pay for them still when there now free?!?

    keynote and pages are now free, but why do i need to pay for them still when there now free?!?

    Users can obtain the iWorks and iLife applications free, if they purchased a Mac after the beginning of October 2013.
    Older Mac purchases require a paid purchase of these applications.

  • I am from Bangladesh. I can't log in with my gmail Apple ID. When I put in the mail and password, and press sign in, it says it has to review on iTunes. Then I am directed to opening a new account. But why should I , since I have one. Plz help :(

    I am from Bangladesh. I can't log in with my gmail Apple ID. When I put in the mail and password, and press sign in, it says it has to review on iTunes. Then I am directed to opening a new account. But why should I , since I have one. Plz help

    Hi Ishrak,
    I apologize, I'm a bit unclear on exactly what you are trying to log into with your Apple ID, or what exactly you are seeing (alert message, directions, etc) when you try to do so. If you continue to have issues with your Apple ID, you may find one or more of the articles linked from the following page helpful:
    Apple ID - Apple Support
    Regards,
    - Brenden

  • I just brought Macbook pro(without retina display) on 15 june 2013 and since then put it on 6-7 hours of charging but still my macbook pro is not 100% charged. but why? (green light is displayed on the adapter pin)

    i just brought Macbook pro(without retina display) on 15 june 2013 and when i switched it on the battery was 72 % charged and now the battery is charged to 62%, i used the charger that came with it and kept it for 6-7 hours on charging but it is not charged to 100% but why? also the green light is always on when i plug the charger with my mac book pro.Please tell me the meaning of Green light on power cord lid (mac book pro not charging or charging?) and also the other light if there like amber or any other colour.

    Hello Shailendras33,
    Congratulations on your new MacBook Pro!  Thank you for providing all the information about what is going on with the charging issue. 
    Firstly, I found some information on page 11 of the MacBook Pro User Guide about what each color of the LED means on the Power Adapter:
    When you first connect your power adapter to your MacBook Pro, an indicator light on the
    MagSafe connector starts to glow.  An amber light indicates the battery is charging.  A green light indicates that the battery is fully charged.
    You can find the MacBook Pro User Guide here (this is not for the latest MacBook Pro, but the information about the MagSafe adapter is true for the newest model):
    MacBook Pro User Guide
    http://manuals.info.apple.com/en_US/macbook_pro_15inch_late_2011.pdf
    It sounds like you are not getting the amber light indicating your computer is charging, and you are noticing that the battery level is depleting.  I recommend resetting your System Management Controller when something like this is occurring:
    Resetting the SMC on portables with a battery you should not remove on your own
    Note: Portable computers that have a battery you should not remove on your own include MacBook Pro (Early 2009) and later, all models of MacBook Air, and MacBook (Late 2009).
    Shut down the computer.
    Plug in the MagSafe power adapter to a power source, connecting it to the Mac if its not already connected.
    On the built-in keyboard, press the (left side) Shift-Control-Option keys and the power button at the same time.
    Release all the keys and the power button at the same time.
    Press the power button to turn on the computer. 
    Note: The LED on the MagSafe power adapter may change states or temporarily turn off when you reset the SMC.
    You can find the full article here:
    Intel-based Macs: Resetting the System Management Controller (SMC)
    http://support.apple.com/kb/ht3964
    Thank you for posting in the Apple Support Communities. 
    Best,
    Sheila M.

  • I can no longer down load on iTunes said I need a new payment method but why does my bank card no longer work how do I fix this

    Hey everyone I can no longer down load or up date my games videos so on on iTunes
    It's telling me I need a new payment method  but why would my bank card no longer work how can I fix it so my bank card works again

    how do i fix this

  • HT201272 I can see my previously purchase music, it says downloaded but why can't i download the music? The were accidentally deleted from the itune folder?

    I can see my previously purchase music, it says downloaded but why can't i download the music? The were accidentally deleted from the itune folder?

    Do I have to have icloud to download previously purchased music?

  • Full screen is great but why take out my links bar?

    Full screen is great but why take out my links bar?
    Is there an option or customisation to show it in full screen mode..  I can understand taking out the file menu but that second delay is unpreciated to access links also.

    Hi Atomic AI
    can I achieve the opposite - I would like to start my full screen safari without the title bar, links bar or similar. just nothing except the content of the page - is this possible? I cant figure it out

  • Goodnight gracie, I know this is trivial but why?

    I know this is trivial but in System profiler in the syncservices log i find this, or variantys thereof:
    2011-06-13 20:45:44:432|SyncServer|1994|110fd0|Server|Info| Goodnight, Gracie.
    I think it a message  when the mac goes into sleep mode. But why 'Goodnight Gracie' Apparently it was a catchprase used by George Burns at the end of his radio show, but does anyone know who or why it was included in this log message?
    mike

    Someone may, but it was put in there by one of the programmers as a joke.

  • "ORA-1715 : UNIQUE may not be used with a cluster index" but why?

    "ORA-1715 : UNIQUE may not be used with a cluster index" but why and what "may" means here? Any comments will be welcomed, thank you and best regards;
    show rel
    release 1002000300
    CREATE CLUSTER sc_srvr_id (
    srvr_id NUMBER(10)) SIZE 1024;
    SELECT cluster_name, tablespace_name, hashkeys,
    degree, single_table FROM user_clusters;
    CREATE UNIQUE INDEX idx_sc_srvr_id ON CLUSTER sc_srvr_id;
    ERROR at line 1:
    ORA-01715: UNIQUE may not be used with a cluster index
    CREATE INDEX idx_sc_srvr_id ON CLUSTER sc_srvr_id;
    SELECT index_name, index_type, tablespace_name
    FROM user_indexes where index_name like '%SRVR%' ;
    CREATE TABLE cservers (
    srvr_id    NUMBER(10),
    network_id NUMBER(10),
    status     VARCHAR2(1),
    latitude   FLOAT(20),
    longitude  FLOAT(20),
    netaddress VARCHAR2(15))
    CLUSTER sc_srvr_id (srvr_id);
    ALTER TABLE cservers add constraint pk_srvr_id primary key (srvr_id ) ;
    SELECT index_name, index_type, tablespace_name
    FROM user_indexes where index_name like '%SRVR%' ;
    INDEX_NAME                     INDEX_TYPE
    TABLESPACE_NAME
    IDX_SC_SRVR_ID                 CLUSTER
    USERS
    PK_SRVR_ID                     NORMAL
    USERSdo we really need another pkey index here?

    "May" has different meanings, one of which is:
    (used to express opportunity or permission)
    Metalink note 19067.1 says:
    This is not permitted.
    ... which agrees with the above meaning of it.
    Besides these, it does not make any sense to me to create a unique index on a cluster. You can have primary keys in the tables you include in the cluster, it depends on your business requirement. But why do you need a unique index on a cluster?

Maybe you are looking for

  • Is there any way to print an A5 size page from iPad?

    I've looked everywhere. I can't believe the A5 format is missing from Pages. Can't believe I didn't notice sooner! Does anyone have ay ideas please?

  • Ipad screen keep on moving and zooming in and out

    My iapd 2 screen keep zooming in and out. At the  same time, it also moving . How could i solve this problem?

  • Kernel upgrade : cannot find AMD64

    Hi, I cannot find a kernel upgrade for Windows 2003 64Bit  in the software downloads. Status Host Data Machine Machine Type: 4X  AMD64 L OS : Windows NT Componenet version SAP ECC 6.0 Please help.

  • Complex Script logic

    Hello I have a comple script logic and I know there are some errors with it. How can I step through line by line / debug that logic to make sure / fix that issues ? Similarly how do I  step through line by line / debug logic in Script / Stroed Proced

  • Using BASH environment variables in xCode build configuration

    Hi All, Is it possible to use BASH environment variables (exported from /etc/profile, for example) in xcode build settings? Specifically, I am exporting a "BOOST_HOME" variable, and would like to referencing this variable in "User Header Search Path"