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.

Similar Messages

  • Large Swap file

      Model Name:    MacBook Pro
      Model Identifier:    MacBookPro6,2
      Processor Name:    Intel Core i5
      Processor Speed:    2.53 GHz
      Number Of Processors:    1
      Total Number Of Cores:    2
      L2 Cache (per core):    256 KB
      L3 Cache:    3 MB
      Memory:    8 GB
      Processor Interconnect Speed:    4.8 GT/s
    Running the latest version of Parallels and Windows 7 64 bit.
    Using the Activity monitor I find that I always have  a large swap file (even when parallels is not running), a huge  amount of inactive memory and a very small free memory. It slows down my system. Any suggestions?

    First, upgrade your system to 10.6.7 or 10.6.8. Second, large swap files don't necessarily mean a thing. You might see the following:
    About OS X Memory Management and Usage
    Reading system memory usage in Activity Monitor
    Memory Management in Mac OS X
    Performance Guidelines- Memory Management in Mac OS X
    A detailed look at memory usage in OS X
    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.
    Bear in mind you are running Parallels and a VM concurrently with some other OS X applications. Too many concurrent applications will result in using too much memory and increasing swapping.

  • Generate large swap file (Use qtparted to generate partition

    Desire to generate a 30GB swap file in Linux using the full capacity of a hard drive as swap.
    Can this be done with the arch0.5 install CD?
    I assume I must skip the auto feature to do so.  I do not know if the CD program will allow skipping the program install steps and just install lilo.
    Perhaps someone has done a similar thing?

    i3839;
    Thanks for the comments.
    The desired entry is not to hdd but to ram such that all operations take place in ram...no hdd used...no CD orDVD used (except tp start the ram install). 
    While in ram, all video is improved when uncompressed video is entered (.vob for instance) and the result is higher quality and better resolution.
    The basic question is in reference to arch install CD and whether it can be utilized to generate a HDD with just swap (one or more partitions) . 
    My experience with the arch CD indicates it doesn't like the install to skip any steps.  Perhaps I can try a partition install and then abort the rest.  I think it will allow three separate swap (type 82) partitions:  at the least one of 2GB.  Perhaps it is programmed however, to require a root and a boot as well as a swap.
    I suggest you read the previous post which describes the install to ram...called 'toram' in knoppix.  This doesn't use the hdd, just the dvd reader.  It can however utilize a hdd file entered in a dvd install....tohd.. and add the cheat code ...toram..
    The end result is a ram only OS which can utilize USB hotplug devices for entry and storage, turning them off when not in use.
    The present system here has 2.5GB of ram but it is not able to accept the DVD of 2GB when attempting ..toram.   The same ...toram..cheat code is available for the CD version which operates well in ram (only 680MB).  The use of swap to augment ram is recommended.
    Dvd versions have close to 5GB of programs in compressed form in the 2.1GB DVD media.
    I hope this post helps describe the need for the swap a little better.

  • How to diagnose large swap usage

    Hi,
    We have a java application that is connecting to our oracle 10g database. When the application is not connected the swap file usage on the solaris box is about 1GB. But soon as we startup the java application and connect it to oracle the swap usage jumps to a massive 16GB (and stays like that until with shutdown the application - it does not really grow any more)
    The application actually looks fine and works without problems - expect the database is hammering the machine with the swap file. can anyone give me some hints at where I can look on the database to try and diagnose what is acutally causing this large swap file creation - in an attempt what is this application doing? At the moment I am confused as to what could actually cause this.
    thx.
    S.

    Hi, I'd use the iosnoop, iotop, rwsnoop and rwtop commands available in dtrace package (eg. http://users.tpg.com.au/adsln4yb/DTrace/dtracevstruss.html). It can tell a lot about i/o operations, also according to swap. But it only applies to the OS, I can't help you with the Oracle...

  • VAR and Swap Files - Taking up 3 gigs of space!

    My 60 gig HD has been getting close to its size limit so I ran DiskSweeper to see if there were some unneeded files etc. that I could throw away. I discovered that the VAR folder was using 1.95 gigs and in the VM folder, the swap files were taking up about 1 gig...
    I guess these are essential system files and can’t be deleted or reduced in size, or can they?
    Thanks in advance!

    To clear the swap file(s) restart your computer. I've never had more than two swap files, but then I have enough RAM for what I do. If your system keeps creating large swap files then it is a sign you need more RAM. If you can't get more, you'll need to limit the number of RAM hungry programs you have running at the same time. Because of the things that get dynamically created as you work, such as swap files and temp files, you should have a minimum of 10% of your drive free, and 15 would be safer. If I were you I would make sure I always had 10GBs free. You might look into getting an external drive, and move some of your files over to it. For instance, you can move your iTunes music library to another drive--I've done that because my startup drive is also a "mere" 60GBs.
    Francine
    Schwieder

  • How to set SAXParser at command-line interface to create a large XML file

    Hi,
    I am trying to create a large XML file (more than 50 MB) by selecting from Oracle database but failed because of "out of memory" error. According to "Oracle XML Developer Guide", we should use SAXParser to parsing a large XML file. But there is no example to show how to set SAXParser at command-line
    Following is what I use to get xml files. It works only when the file is small.
    java OracleXML getXML -DateFormat -withDTD -rowsetTag PO_HDR -conn
    "jdbc:oracle:oci8:@server_name" -user "ID/password" "select * from table_name"
    When I set SAXParser at the way below,
    java oracle.xml.parser.v2.SAXParser OracleXML getXML -DateFormat -withDTD -rowsetTag PO_HDR -conn
    "jdbc:oracle:oci8:@server_name" -user "ID/password" "select * from table_name"
    it failed with the error message: "In class oracle.xml.parser.v2.SAXParser: void main(String argv[]) is not defined"
    Does anyone know how to solve the problem? I'll be appreciated very much for your help.
    Yi

    here are my ideas.
    register the xml schema.
    using xmldom, generate the desired xml output and return as xmltype.
    then you can use something like this to check.
    declare
    xmldoc xmltype ;
    begin
       -- populate xmldoc from you xmldom function
       -- validate against XML schema
       xmldoc.isSchemaValid(schema_url, root_element);
       if xmldoc.isSchemaValid = 1 then
            --valid schema
       else
            --invalid
       end if;
    end

  • Leopard swap file options

    hi,
    Back in Panther days you could force the swap file location but it got mucked up and frightfully complicated in Tiger. I have ram to spare. Can you force the OS to ether:
    A; never use a Swap file(I have 12 gb soon to be 16 GB EEC ram) or;
    B; use a ram disk like you can do in Photoshop
    C: Send it to a specific partition if it insists on not noticing it never runs out of ram.
    That last part has always bugged me. I always ran Tiger on this machine previously and it was annoying seeing all that free ram at thje same time watching the Os merrily paging out chunks of itself.
    So, in terms of preference, It would be nice to have a terminal command(bootup script that would forbid the OS from ever paging out anything. I am so far away from saturating the bus it is not even funny. I have watched it Boinc on all 4 processors and still have 4 gb of Ram sitting idle.

    It is time for Apple to fix that performance whole. Why sell machines that have max out slots with far more memory then the machine can ever use even at full tilt.
    They have made great strides in the memory use department with the Mac Pro.
    OS X only uses a set amount of memory, and then goes to virtual memory.
    A lot of this is to allow other applications to use/have access to the RAM, rather than having the OS hogging it all.
    There is no user control for this, short of hacking the memory allocation process within the BSD.
    Just keep plenty of free space on the boot drive for the OS to run properly, and have a second scratch drive for PS and pro apps to use to run properly.

  • RAM large swap and paging after open large video file

    Hi I'm using an i7 MBP with 4GB RAM. I have an issue, after watching a movie on the mac (file size about 4-5 GB) with vlc player, I found my RAM Swap jumped from 512MB to 3GB, and an substantial increased in paging (page in around 800k, page out around 100k).
    After closing the player, my MBP become super slow and I have to wait for several minutes for it to stabilize itself, and still with a little retard here and there.
    Could anyone enlighten me on this problem?
    Thank you.

    About OS X Memory Management and Usage
    Reading system memory usage in Activity Monitor
    Memory Management in Mac OS X
    Performance Guidelines- Memory Management in Mac OS X
    A detailed look at memory usage in OS X
    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.

  • I have recently moved all of my files to a larger external hard drive, but when I am reminder of an itunes upgrade it's still attempting to go to the old drive.  How can I change the settings so it automatically goes to my new hard drive?

    I have recently moved all of my files to a larger external hard drive, but when I am reminder of an itunes upgrade it's still attempting to go to the old drive.  How can I change the settings so it automatically goes to my new hard drive?

    lisacooney wrote:
    I have recently moved all of my files to a larger external hard drive
    How did you move these files?

  • I want to load large raw XML file in firefox and parse by DOM. But, for large XML file the firefox very slow some time crashed . Is there any option to increase DOM handling memory in Firefox

    Actually i am using an off-line form to load very large XML file and using firefox to load that form. But, its taking more time to load and some time the browser crashed. through DOM parsing this XML file to my form. Is there any option to increase DOM handler size in firefox

    Thank you for your suggestion. I have a question,
    though. If I use a relational database and try to
    access it for EACH and EVERY click the user makes,
    wouldn't that take much time to populate the page with
    data?
    Isn't XML store more efficient here? Please reply me.You have the choice of reading a small number of records (10 children per element?) from a database, or parsing multiple megabytes. Reading 10 records from a database should take maybe 100 milliseconds (1/10 of a second). I have written a web application that reads several hundred records and returns them with acceptable response time, and I am no expert. To parse an XML file of many megabytes... you have already tried this, so you know how long it takes, right? If you haven't tried it then you should. It's possible to waste a lot of time considering alternatives -- the term is "analysis paralysis". Speculating on how fast something might be doesn't get you very far.

  • I am trying to download a very large tarball ( 100 GB) but I can't open tha archive. I am wondering if the download manager may be truncating the file.

    I downloaded a large .tar file (should be over 100 GB) and tried to unpack it with 7zip, but I got an error message saying "Can not open file 'X.tar' as archive." I am trying to download it again in case it was just a random corruption or something, but since I have a few hours to kill, I was wondering if the problem may be that there is a limit to the size of files the download manager will handle.

    Hi Salmonarm, <br/>Sorry no one replied earlier, you have probably solved the problem yourself by now.
    I am not aware of any Firefox limitations on download size.
    Are there any systems available for checking for corruption. Often downloads have hash values that can be used to check.
    Also do you know the compressed file size, does it appear to have downloaded fully.
    Are you running into limitations due to available folder or file size on your drive or file system.
    * see http://en.wikipedia.org/wiki/Comparison_of_file_systems#Limits

  • I Stat Pro: 10 MB free memory but 256 MB swap file.  What does this mean?

    I have a 20 inch Intel Core Duo 2 Ghz iMac with the stock 512 MB memory stick.
    The most intensive things I do are video and photo editing, and the system does seems to lag or sometimes dvd menus stutter.
    Do I need more memory?
    I Stat Pro widget will say that I have around 10 MB of free memory, but the swap file will say 256 MB or even 512 MB.

    A swap file is memory that is on your hard drive. There usually is a minimum amount, and it will increase drastically when you run out of physical RAM which you appear to be doing. For example, I have 2 gigs and I have almost 1.5 unused typing here and a 64 mb swap file.
    You also have to consider Rosetta if you are running Adobe PSCS2 and other Power PC version software. If so, Rosetta uses up a ton of memory to run the non-universal apps on the Intel Macs.
    In my opinion, you need at least 1 gig, and will be way happier with 2 if running Adobe and MS Office stuff, just like others have posted.
    DDR also requires matched pairs to run in dual state, so if you had 2 sticks of 512 or 2 of 1 gig, your speed will increase.
    Bottom line, if it's fast enough for you and you don't mind the hard drive churning, don't let us spend your money
    Michael

  • In large PDF files my cursor moves around the page at warp speed. It does not seem to make any difference if I slow it down with Sys Prefs. This is not only in preview but also other programs to open PDFs.

    In large PDF files the cursor moves at warp speed with a mind of it's own, I've tried slowing it down in Sys Pref with no luck. On small files cursor action is normal. This happens in Safari, Preview and other programs that use PDF files. Sorry to say this does not seem to be a new problem with 7.# I've had it with prvevious versions of operating system Right now I'm using a Apple wireless mouse and key board. Using the USB keyboard and mouse the same problem does not go away.

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you boot, and again when you log in.
    Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to boot and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal boot may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, reboot as usual (not in safe mode) and verify that you still have the problem. Post the results of Steps 1 and 2.

  • Changing swap file location on tray-loader iMacs

    This is not a question, but something I discovered that makes my old tray-loader iMac (the oldest iMac models) run Mac OS X much better.
    As you may know, these oldest iMacs have an 8GB size limit on the boot volume. The largest stock drive on these iMacs was 6GB. That means if your upgraded hard drive is larger than 8GB, it must be partition so that the first partition is under 8GB (7.78GB on my iMac), and it must be the boot partition where the OS is installed (whether it's Mac OS X or 9).
    In my case, I have a roomy 120GB hard drive (I believe the useable limit on these iMacs is 128GB). The first partition is just under 8GB, the second partition is the rest of the space, about 104GB. I have used every trick out there to move files (such as the iTunes music folder and most of my user/documents files) off to the second partition, to make free space on the boot partition as large as possible. So I have 3.5GB free on my 8GB boot partition. This is about 40% of the volume's total space so it seems pretty good, until you realize that most recent Macs have much more than the TOTAL 8GB I have, as free space on the boot volume. Mac OS X was just not designed to work well with small boot volumes...
    Mac OS X uses the free space on the boot volume for its virtual memory "swap file." Considering these old iMacs max out at 512MB of RAM, virtual memory is being used quite a bit. But since space on the boot volume is very limited, low RAM and lack of free space can lead to performance issues. Here's what I observed. When I initially started up my iMac, I had about 3.5GB of free space. Over time, as I used more and more apps, that free space would diminish until I had only about 600MB remaining (as reported by a Finder window). At the same time, I noticed performance getting bogged down and more "chugging" sounds coming from the hard-working hard drive.
    I've known about changing location of the swap file, but never tried it until recently. During the Mac OS X boot process, the Mac sets the location of the swap file. By default, the swap file resides on the boot volume (I believe most other Unix-based systems use a dedicated "swap partition" for the swap file). Since most recent Macs have large drives set up as one partition (and there is plenty of free space), and since many users have upgraded their RAM (and virtual memory is not as critical), swap file location is usually not an issue, and there is certainly no need to change the swap file location. However, on my iMac with an 8GB limit on the boot volume and 512MB of RAM, it made a noticeable difference.
    I found one set of procedures on the web that was much better than the others I found for changing the location of the swap file.
    http://www.math.columbia.edu/~bayer/OSX/swapfile/
    On this page, there are two choices for Panther users. I used the one that works for both Panther and Tiger, because it appeared to me to be more straightforward. The author intentionally keeps the instructions somewhat technical to discourage users who are not technically inclined. I don't consider myself to be too "geeky," but I can follow instructions and type a few commands in Terminal.
    After I changed the swap file location to a large mostly empty volume, I noticed much better performance when I have many large apps open at the same time. Performance no longer degrades over time, and the free space on my boot volume remains a constant 3.6GB.
    The reason for this post is to share this information. Some users of these old iMacs may be noticing the same issues I had. This is a possible solution. However, if everything is OK with your set up, there is no reason to change the swap file location. If you try it, be sure to take the usual data backup precautions.
    If anyone else has experience with changing swap file location, please post your comments here.

    Problem has been solved:
    background.setCapability(Background.ALLOW_IMAGE_WRITE);Thanks everybody for reading this :)

  • Swap file in use after 12 minutes uptime

    Hi
    I noticed this a little bit of a strange behavior recently. Once I power my Mac up, the amount of free memory is around 1.34 GB, as I don't have many startup items. Then I launch Skype and torrent client (µTorrent or Transmission) and wait about 10-12 minutes - the amount of inactive memory becomes almost half of total, 20-30 MB free, and swap file is already in use. I mean is that normal with total physical RAM of 2 GB? As far as I know the Unused memory is used for apps I quit not to reallocate it once I launch it again. Nothing launched - nothing to keep unused, right? And swap file is in use for a reason I don't quite well understand. I mean I got the idea behind virtual memory, but this behavior is something that haven't been there before. Just in case - I "Erase & Install"-ed the system last week, so it is pretty "clean".
    Also the screenshot of my iStat pro widget to illustrate the situation.

    Swapping happens because there is more demand for memory than you have, and some modified pages have been sitting idle longer than other pages that are in use.
    If you think you have too little memory for the application set you are using, then do the following and find out. Launch Applications -> Utilities -> Terminal and enter the command:
    sar -g 60 100
    This will tell you the pageout information every 60 seconds for 100 minutes (adjust 60 and 100 to suit your tastes).
    If you mostly have zeros or very low numbers, then you do not have a serious memory problem. If you have an occasional burst of pageouts, but the rest of the time it is zero, you do not have a memory problem. However, if you have sustained pageouts, especially when you notice a performance slow down, then you could benefit from more memory, or run applications that are less memory intensive (or if running too many concurrent applications that you are not really using, quit a few).
    Programmers tend to write applications that consume as much memory as they like without concern for how much memory you actually have. In some cases they have have development systems with a lot more memory than you do, so they don't even notice that they are consuming a lot of memory. This is speaking as a programmer that started life writting code on 80 column punched cards and running them on systems with 8192 bytes of memory

Maybe you are looking for

  • Create a Raid to be used in VISTA

    Need some help on this raid. I am running Vista on a MacPro, I want to raid two 500gig external dives. The raid is just to read files off of. So this is not an OS install thread. In disk management, I have deleted the volumes, than created a new stri

  • EXPORT catexp.sql 9.2.0.4.0

    Hi I would like to install catexp.sql with SYS user as SYSDBA. It was succesfully but when I tried to run "exp" I got the following errors: (Export option was OWNER=wps, GRANTS=y, ROWS=y, COMPRESS=y The database run on SUN SERVER. :>showrev Hostname:

  • Evaluate is not working for my custom function

    Hello everyone , I have a function , here's the code CREATE OR REPLACE FUNCTION FU_BUSCA_RECD_PRDC_OBIEE(NIVEL   VARCHAR,                                                     NM_AGPM VARCHAR) RETURN NUMBER AS   V_RECD_PRDC NUMBER(10); BEGIN   IF NIVEL

  • Current folder file dialog

    I have been using a file dialog popup that allows selection of multiple files from this thread, posted by Wiebe. Works great, I highly recommend it. However, I was wondering if anyone know of a way to include the button "Current Folder" like you see

  • 10.4.6 broke my Internet Sharing HELP!

    Hi There I just updated my HOST computer - a G5 dual 2.0g - from OS 10.4.7 to 10.4.8. I previously connected a PowerBook G4 1.25g to the above HOST via FIREWIRE and AIRPORT under 10.4.7 and both worked perfectly. After updating it doesn't work! Under