Swap File Space

Does anyone know how the "default" swap file space number is computed ? Where does this number come from ?

Does anyone know how the "default" swap file space number is computed ? Where does this number come from ?

Similar Messages

  • Tiger swap file space

    I was told this by someone at Other World Computing.
    Tiger needs around 3-4GBs for installing and usually recommended to reserve 1-2GBs for the swap file space it uses during operations. The general rule of thumb for a drive is to not fill it more than 85-90% or you may experience drive slow down.
    So this means that I should not let my ibook go down below 2GB's of free space. I am down to 5.5GB at this time. Downloading music has been addicting, and its a shame I did not spedn the extra $100 at the beginnign and ordered the ibook with the 60GB drive.
    John

    You wrote: "I keep on getting different answers. Other world computing tells me 3GB free is adaquate, but Dr. Smoke says 5GB. Who is right?"It's a controversial issue: there's no hard and fast number because it depends upon the load your placing on your Mac, how much RAM you have, and how much free disk space you have. However, I stand behind my 5 GB minimum assertion as follows:
    1. If you read "Mac OS X System Requirements" it states you need:"At least 3.0 GB of available space on your hard drive; 4GB of disk space if you install XCode 2 developer tools."Therefore, to perform an Archive and Install of just the OS, you need at least 3 GB of free disk space. You certainly don't want to get to the point where you can't perform an Archive and Install of the OS due to insufficient free disk space.
    2. You also need some VM swap file space: regardless of how much RAM you have, there's always at least one swap file in /private/var/vm, though it may not be large or even used if you have considerable free RAM. Based on tests I've done with a variety of Mac configurations, 2 GB seems to be a safe general margin allowance for swap files. As noted in my "Problems from insufficient RAM and free hard disk space" FAQ (have you read it?), too little swap space combined with too little RAM can lead to trashing as well as a whole host of other problems.
    Add those up, and you get 5GB as an absolute minimum as a margin of safety. More free space is better, and in some cases, far more is required for a margin of safety, e.g. reserving enough free space in case one uses FileVault needs to turn it off.
    Believe me or don't believe me. You asked, I answered, and can back up what I stated, as noted above.
    Good luck!
    Dr. Smoke
    Author: Troubleshooting Mac® OS X
    Note: The information provided in the link(s) above is freely available. However, because I own The X Lab™, a commercial Web site to which some of these links point, the Apple Discussions Terms of Use require I include the following disclosure statement with this post:
    I may receive some form of compensation, financial or otherwise, from my recommendation or link.

  • Tiger Swap File Space (Apples answer)

    I called Apple Tech support today and was told not to let my drive go any lower than 3GB's. I told the agent what I use my Mac for, and he suggested that I move files to a USB external which I will do.
    He also agreed that OSX Tiger does have some drawbcks when compared to the old Mac os. I told him that with the old Mac OS one could lower the drive down to under a gig (which I did with my Performa), and the Mac would still run well if it had plenty of RAM. 512MB's for Tiger is still 256MB more than it requires, so I am in the good light in this area.
    I do not use a modern version of Photoshop, nor that security feature Dr. Smoke was telling me about. But perhaps I will see what it is about as it sounds interesting.
    Its really a shame that Apple would sell laptops with such dinky hard drives, and make it so expensive and so difficult to upgrade them.
    But then again my PDA's also have dinky drives (32MB), and my only upgrade options are via flash memory, which is not exactly the same as internal RAM, no matter what anyone says. Internal RAM is both faster, uses less battery, and offers many other advantages, not found in a SD/CF card.
    Back to my ibook
    Thanks for the tips guys, and to you Dr. Smoke.
    John

    I called Apple Tech support today and was told not to let my drive go any lower than 3GB's. I told the agent what I use my Mac for, and he suggested that I move files to a USB external which I will do.
    He also agreed that OSX Tiger does have some drawbcks when compared to the old Mac os. I told him that with the old Mac OS one could lower the drive down to under a gig (which I did with my Performa), and the Mac would still run well if it had plenty of RAM. 512MB's for Tiger is still 256MB more than it requires, so I am in the good light in this area.
    I do not use a modern version of Photoshop, nor that security feature Dr. Smoke was telling me about. But perhaps I will see what it is about as it sounds interesting.
    Its really a shame that Apple would sell laptops with such dinky hard drives, and make it so expensive and so difficult to upgrade them.
    But then again my PDA's also have dinky drives (32MB), and my only upgrade options are via flash memory, which is not exactly the same as internal RAM, no matter what anyone says. Internal RAM is both faster, uses less battery, and offers many other advantages, not found in a SD/CF card.
    Back to my ibook
    Thanks for the tips guys, and to you Dr. Smoke.
    John

  • Not memory consumed, no swap file usage

    We have a 4 processor Windows 2000 server with 4 gig of Ram.While running a data load and calc process against one database in Essbase that pegs the cpu at 2 gig, the Essbase server info window shows no memory being used and no swap file space being used....Why? Is this a bug in Essbase, do other people note the same problem?Thanks for any insight you can provide,GeorgePS - We're on Essbase 6.1 patch 3a.

    Essbase has configurable parameters that control RAM usage - specifically:The Index CacheThe Data CacheThe Data File CacheThe Calc CacheThese settings will have an effect on what memory Essbase uses during a calc. They can be found in Database / Settings using Application Manager.Regards,Jade===============================Jade ColeSenior Business Intelligence ConsultantClarity [email protected]

  • Moving swap file, any advantage?

    Hi all,
    I have a late 2008 unibody mac book pro with sl 10.6.4. I have a custom setup:
    optibay with OCZ vertex 2 120gb PRIMARY DRIVE
    momentus xt 500gb secondary drive
    Given the alleged problems that ssds encounter after a while without trim support I was wondering if moving the swap file to the xt would help. I have three questions:
    1) Would it actually help?
    2) Would performance be worse because I am moving the swap file to a slower drive?
    3) How do you move a swap file?
    Thanks!

    VM is merely memory reserved by the system, not necessarily used as swap space. So you will always have a sizeable VM showing in the monitor application, since it allocates the page file space without necessarily using it.
    The thing to watch is the page outs, as you realize. That is actual data being written to disk. Or just go into private/var/vm and see how many files and how much space is being used.
    Ordinarily, it only makes sense to move swap space if you are frequently using a lot of actual swap file space, and if you have a substantially faster drive to move it to. I don't really know how well a SSD drive will handle intensive swap thrashing, so it may not be an issue, or, perhaps you'll still get the best performance with it instead of the slower hard drive.
    If you do decide to move it, be sure to have a reliable up-to-date backup available too. As I mentioned, if the move is not done correctly, down the road a bit after booting you may find yourself with a spectacular failure and all sorts of data corruption (orphaned symbolic links are often very bad things).
    I would say monitor your VM use and system performance for a bit, especially once you start working your system as hard as you think you will normally be doing. Then, as long as you have a backup to go to, you can try the alternative and see if it even makes any difference (I'm highly skeptical that it will, but I don't honestly know).
    Message was edited by: Michael Black

  • Swap file keeps increasing until out of space

    Hello, I have a serious problem with my swap file on my 10.6 server. My server is creating swap files that are 1.06 GB each! and it will keep creating these files until it uses all available disc space which is around 40GB. At that moment, the server will basically crash. Has anyone seen this before? I have 2GB memory, could they be bad?
    thanks!

    dunne89 wrote:
    I have the same problem. I hav 62 swap files weighing in at 1.07GB EACH!! When i run multiple applications it says its running out of memory even though theres 100GB left on my hard drive. Im running 10.6.8. I did a reboot about a week ago and it deleted all the swap files but one, which is great, but now they've gradually built back up again and i dont kno what to do. i dont want to have to reboot every few days to be able to use my computer. any suggestions?
    As mentioned, what cured it for me was installing the 10.6.8 version 1.1 combo update. Even if you have already previously upgraded to 10.6.8 nothing prevents you re-running this combo update. You can download it from here http://support.apple.com/kb/DL1402
    It is normal for VM usage to grow over time especially if the computer is running a number of apps, but my previous problem was using up space far faster than normal and is now back to normal after running the combo update.

  • Performance: swap space vs. swap file?

    After install of Red Hat Linux ES 3.0 UL3, I found that the swap space is set to only 2 GB. The SA claims that to increase the swap space, he must reinstall Linux because the partition is full.
    Another option would be to add a swap file to a free partition.
    Are there any issues with having swap files vs. swap space?

    You should be able to use the free partition as swap space as well, without reinstall of Linux.
    More information is available from the Redhat website :
    http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/custom-guide/s1-swap-adding.html

  • 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

  • Fusion Drive & Swap files

    From time to time on my new Mac Mini with 1 TB Fusion Drive, I am getting the following error: "Your Mac OS X startup disk has no more space available for application memory."
    This would indicate an issue with being able to write swap files/virtual memory. If I understand how the Fusion Drive works, the virtual memory is stored on the 128 GB SSD portion.  The SSD is full, considering I have 650 GB free on the 1.128 TB Fusion Drive.
    Seems like a CoreStorage issue, as it's apparently not leaving enough space on the SSD for the swap files after the computer has been run for a while. I have 16 GB RAM in the Mini.
    Restarting the computer solves the issue, although I often use the Mini in remote sessions and when this error comes up, performance on the Mini tends to be so sluggish that sometimes remote connections time out or drop, making it hard to even be able to restart the computer.

    Your problem is excessive swapping of data between physical memory and virtual memory.
    That can happen for two reasons:
    You have a long-running process with a memory leak (i.e., a bug), or
    You don't have enough memory installed for your usage pattern.
    Tracking down a memory leak can be difficult, and it may come down to a process of elimination. In Activity Monitor, select All Processes from the menu in the toolbar, if not already selected. 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 memory over time without ever releasing it.
    If you don't have an obvious memory leak, your options are to install more memory (if possible) or to run fewer programs simultaneously.
    The next suggestion is only for users familiar with the shell. For a more precise, but potentially misleading, test, run the following command: 
    sudo leaks -nocontext -nostacks process | grep total
    where process is the name of a process you suspect of leaking memory. Almost every process will leak some memory; the question is how much, and especially how much the leak increases with time. I can’t be more specific. See the leaks(1) man page and the Apple developer documentation for details:
    Memory Usage Performance Guidelines: About the Virtual Memory System

  • 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 :)

  • Problem with swap files after reboot.

    Hello
    I have installed Solaris 10 10/09 s10x_u8wos_08a on a Sun Fire X4140.
    The file system is UFS.
    I wish to add more swap space
    I have created these two files under /export/home:
    -rw------T 1 root root 5368709120 Jun 16 10:12 newswap
    -rw------T 1 root root 2147483648 Jun 16 10:38 newswap2
    When I enter swap -a /export/home/newswap, the command succeeds and I can see the additional swapspace with swap -l.
    I have the following configuration in /etc/vfstab
    # cat /etc/vfstab
    #device device mount FS fsck mount mount
    #to mount to fsck point type pass at boot options
    fd - /dev/fd fd - no -
    /proc - /proc proc - no -
    /dev/dsk/c1t5d0s1 - - swap - no -
    /dev/dsk/c1t5d0s0 /dev/rdsk/c1t5d0s0 / ufs 1 no -
    /dev/dsk/c1t5d0s7 /dev/rdsk/c1t5d0s7 /export/home ufs 2 yes -
    /export/home/newswap - - swap - no -
    /export/home/newswap2 - - swap - no -
    /devices - /devices devfs - no -
    sharefs - /etc/dfs/sharetab sharefs - no -
    ctfs - /system/contract ctfs - no -
    objfs - /system/object objfs - no -
    swap - /tmp tmpfs - yes -
    Although it is supposed to work, after reboot, the only mounted swap file is /dev/dsk/c1t5d0s1.
    The two file under /export/home aren't mounted as swap. Why?
    Can anybody give me some help on this issue?
    Thanks

    Actually you don't have to create a dedicated slice/filesystem for swap.
    You can create files and then use them as swap.
    Here is the link from the documentation of Solaris
    http://docs.sun.com/app/docs/doc/817-5093/fsswap-59089?a=view
    My issue is that although I have configured /etc/vfstab according to the documentation, the swap files aren't automatically mounted on boot. I can only mount them as swap manually with swap -a.
    Can anybody help?

  • Limiting Swap File Usage

    i have an issue with my main drive, and whilst i am getting this sorted, in the meantime i have installed a new installation of mavericks onto a 16gb flash drive.
    now a usual fresh install of mavericks takes about 5.8gb and this should leave me a few gb to work with, but alas, the swap file has kicked in and filled all the free space leaving me 688mb on the flash drive. this is fine for using safari, but hopeless on trying to update flash.
    how can i manually set a limit to the swap file?
    this is a temporary solution until the main drive is fixed, so I'm not stressed about longevity of the problem.

    The first thing that happens on a new system has nothing to do with the swap file. It's the creation of the hibernation image file that is roughly equal to the amount of RAM in your computer. I'd guess yours is around 8 GBs.
    It's a terrible idea to try and run the computer from a flash drive. That may be useful for creating an installer disk or an emergency recovery disk that you use once in a while.
    Your only temporary solution is to change the hibernation mode and erase the hibernation sleep image file.
    Open the Terminal and paste the following at the prompt:
         sudo pmset -a hibernatemode 0
    Press RETURN.
         rm -rf /var/vm/*
    Press RETURN.
    After the first command you will be prompted to enter your admin password which is not echoed to the screen - type carefully.

  • Swap partition VS Swap File system

    Hi everyone!!
    I am using Oracle 11g (enterprise edition) on linux redhat 5.5 . At present, we have 12G RAM and swap partition of 2G. I know that we should have swap area of 6GB as per RAM. But we are unable to create new swap partition or resize existing. So I want to know is should I create new swap file of 4Gb that can be used as swap area in addition to existing swap partition of 2Gb. So that total swap area will be of 6G
    ( 2G swap space + 4G swap file).
    1. Will it be meaningful or not ?
    2. Which one is better among swap partition and swap file ?
    3. Will swap file cause performance  degradation due to incompatibility between them ?
    Thanks & Regards
    Tushar Lapani

    This is a 100 percent Unix question and has nothing to with Oracle RDBMS.
    Please close this question here and post it in any Unix forum.
    Sybrand Bakker
    Senior Oracle DBA

  • Swap Partition Vs Swap file

    Hi everyone!!
    I am using Oracle 11g (enterprise edition) on linux redhat 5.5 . At present, we have 12G RAM and swap partition of 2G. I know that we should have swap area of 6GB as per RAM. But we are unable to create new swap partition or resize existing. So I want to know is should I create new swap file of 4Gb that can be used as swap area in addition to existing swap partition of 2Gb. So that total swap area will be of 6G
    ( 2G swap space + 4G swap file).
    1. Will it be meaningful or not ?
    2. Which one is better among swap partition and swap file ?
    3. Will swap file cause performance  degradation due to incompatibility between them ?
    Thanks & Regards
    Tushar Lapani

    Swap is no substitute for RAM. It provides a fail-safe mechanism and allows the kernel to handle active memory allocation more efficiently.
    Your requirement or conclusion about swap space may or may not be reasonable, depending on your desired configuration. As a rule of thumb, swap space is usually configured twice the RAM if you use 8 GB or less and equal the amount of RAM if you have 16 GB or more. If you have 64 GB of RAM, it does however not make sense to have 64 GB of swap space, because the performance degration should you ever need that much swap space will be very bad.
    A swap file as opposed to a swap partition has some security and safety concerns, and some performance overhead because of using a file system, but it can be feasible. It depends on your I/O use and hardware.
    However, you will probably want to configure your Oracle database to use kernel Hugepages using ASMM instead of AMM for best performance and efficient memory use. Kernel Hugepages, unlike POSIX shared memory (/dev/shm) used by AMM, will be pre-allocated at system startup and cannot use swap space.
    Message was edited by: Dude!
    Until kernel 2.4 it was considered that a swap partition is faster than a file, but with the improvements of kernel 2.6, the performances is almost the same. A swap file has the advantage that it can be easier re-sized or removed than a swap partition, but it can get fragmented or deleted by accident. For best performance it should also be located at the outer parts (beginning) of the disk.

  • Swap file locations

    Hi,
    A few questions regarding an upgrade to ecc 6.0.
    What is the recomended swap files locations - on the server's disks or on the storage disks (connected to the server of course).
    and what is the recomended swap files quantity if i have 8 GB of ram and what is the recomended splited files quantity?
    Regards,
    Moshe

    This depends on your operating system, whether your´re on 32- or 64-bit.
    Usually it´s best to have the swap space on a separate disk isolated from OS, database and application.
    Markus

Maybe you are looking for