Causeless swap usage

Hi!
I noticed a performance hit lately when I am using my machine for a few hours, the cause was easy to find: it is swapping. The strange thing here that is my physical memory is not nearly full and it even swaps processes that i'm currently using, for eg. causing tab switching in firefox to be a pain.
Anyone else experiencing this?
total used free shared buffers cached
Mem: 738 730 8 0 1 341
-/+ buffers/cache: 387 351
Swap: 486 164 321

Try fiddling with the swapiness value http://bbs.archlinux.org/viewtopic.php?id=45507
maybe users stop suggesting swappiness as a solution? his has absolutely nothing to do with performance gain or reducing swapping.
Of course if swapping is happening there are (only) two possibilities:
1) increase (not decrease!) swappiness
2) increase RAM
third would be trying to find similar app to the one causing problems that will use less RAM

Similar Messages

  • 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...

  • Unexpected Swap Usage in Oracle RAC

    hi Experts,
    we are running 2 node RAC 10gR2(10.2.0.4) on AIX6.1. we have 196G of physical memory in each and SGA is 144 and PGA is 32 n remaing is for OS on each node. we also have configured SWAP space of 20G . we have 2 physical Standby in single instance one is with LGWR and other one is in ARCH mode. now problum is both nodes shwing more than 50% of Swap usage. which is indicating wrong as SGA and PGA advisor is showing adequate settings of both parameters . so can any one tell me what may be the reason for this memory leakage . one more thing i must add here is we recently shift our RAC from other Servers . but source and destination both are of IBM.

    I'm not an AIX guy at all, but the first thing that came to my mind is large page support. Have you implemented large pages?
    Also, it didn't take much googling at all to find:
    http://www-03.ibm.com/support/techdocs/atsmastr.nsf/WebIndex/WP100883
    Hope that helps,
    -Mark

  • ?Swap Usage

    Is there a utility to see what application(s) are using swap. I have a feeling it may be CS3 Bridge/Photoshop. After I reboot, app works fine but will then start slowing down. Thats when I notice swap being used more and more over time. The system has been running fine up to a few weeks ago. Disk space is down to 60GB and I am working to free it up. Any suggestions or utilities to look
    who is using swap would be appreciated. iMac 24" 2.8GHz intel, 4GB memory, 500GB HD and OS X 10.5.8...
    Thanks!

    You could use an AppleScript "stay open" app. Modify the following as you please. At its simplest you could get an alert when anything more than swapfile0 is created...
    on idle
        if (count paragraphs in ¬
            (do shell script "ls /var/vm/ | grep swapfile")) > 1 then ¬
            do shell script "open /var/vm/"
        return 10
    end idle
    ...or, for instance, to keep advising of any growth in the number of swapfiles...
    property countSwapfiles : 0
    set countSwapfiles to 0
    on idle
        set numSwapfiles to (count paragraphs in ¬
            (do shell script "ls /var/vm/ | grep swapfile"))
        if numSwapfiles > countSwapfiles then
            do shell script "open /var/vm/"
            set countSwapfiles to numSwapfiles"
        end if
        return 10
    end idle
    Andreas

  • [SOLVED] swap usage when there is plenty of ram availibale

    Hi guys, I'm not sure if this is correct subforum, but here is the question
    By default linux kernel uses swap partition even if there is lots of ram availiable. What's the purpose of this? And is there a way to turn this off in Arch.
    Last edited by ogronom (2008-11-03 18:59:10)

    found 2 articles (pretty old) about this issue
    http://www.beranger.org/index.php?article=1547&page=3k
    http://lwn.net/Articles/83588/

  • High cache usage of free memory

    I dont know if this is normal but my fresh archlinux x86_64 install with Xfce uses round 300Mb of 4Gb ram space after boot but then after i start and close some programs i get to 3 Gb used of 3.87 Gb free memory when all applycation are closed. Now i understand that kernel caches some data in memory but i cant clear it all with commands:
    sync
    echo 1 > /proc/sys/vm/drop_caches
    echo 2 > /proc/sys/vm/drop_caches
    echo 3 > /proc/sys/vm/drop_caches
    After i do that system reports 540 Mb used compared to 300Mb from boot. Is there a way to limit the ammount of cache usage so i dont end up having all free memory used by cache?
    Last edited by Anril (2009-12-29 13:19:52)

    Ram that is unused is wasted ram, the linux kernel manages it very well so no worries there.
    If you have swap usage it's because most probably you have things stored in the ram that are not being used often but cannot be discarded too so things being used more often take precedence.
    If you think you have enough ram for all your needs then why not disable swap? I've read that there might be a speed penalty for running without swap but I've been running my system without swap (arch64 4G ram) and I've never had any bad surprises.
    There are a few things that might prompt swap usage (don't quote me on that though, it just seems to me to be the case), if you copy many files from one place to the other the kernel will use all the ram available to try to cache them, if you copy many GB then all the ram will get filled (and maybe other things will get evicted to swap).
    It's not a bug, free ram is there to be used, things that have been used/needed recently get to stay in the ram, other things can go to the swap, if you can cache a file that has been recently used and need to use it again shortly after then it's much faster if it is in the ram instead of having to read it again from the hard disk. The logic behind it is good, it's just that some corner cases may make behave badly.

  • Database Instance Using Swap Space even When There is Plenty of Free RAM

    Hi,
    I am facinga strange issue in oracle on solaris 5.10
    Platform:solaris 5.10
    Database version:11.2.0.1.0
    Our database Instance Using Swap Space even When There is Plenty of Free RAM.
    We have 80GB of physical RAM, 32GB is set to oracle SGA_MAX_SIZE
    memory parameters:
    memory_max_target big integer 32G
    memory_target big integer 32G
    sga_max_size big integer 32G
    sga_target big integer 32G
    but still oracle is taking memory from swap even though we have enough physical memory.
    please find the top output
    load averages: 0.09, 0.18, 0.84 01:07:49
    134 processes: 133 sleeping, 1 on cpu
    CPU states: 99.4% idle, 0.4% user, 0.3% kernel, 0.0% iowait, 0.0% swap
    Memory: 80G real, 69G free, 35G swap in use, 49G swap free
    PID USERNAME LWP PRI NICE SIZE RES STATE TIME CPU COMMAND
    1052 oracle 13 59 0 95M 66M sleep 13:16 0.07% oraagent.bin
    10256 oracle 1 59 0 32G 835M sleep 0:00 0.03% oracle
    1227 oracle 15 59 0 78M 56M sleep 4:27 0.02% ocssd.bin
    9524 vector1 112 59 0 1704M 776M sleep 45:04 0.02% java
    988 oracle 38 59 0 119M 92M sleep 3:00 0.02% ohasd.bin
    1297 oracle 1 101 -20 453M 390M sleep 2:47 0.02% oracle
    1765 oracle 1 101 -20 32G 329M sleep 2:45 0.02% oracle
    10258 oracle 1 59 0 32G 345M sleep 0:00 0.02% oracle
    10259 oracle 1 59 0 3400K 2024K cpu/20 0:00 0.01% top
    1777 oracle 1 59 0 32G 342M sleep 1:14 0.01% oracle
    1246 oracle 6 59 0 56M 44M sleep 1:22 0.01% diskmon.bin
    1803 oracle 1 59 0 32G 514M sleep 0:30 0.01% oracle
    1215 oracle 15 59 0 71M 46M sleep 1:12 0.00% cssdagent
    1307 oracle 1 59 0 453M 390M sleep 0:45 0.00% oracle
    1217 oracle 11 59 0 81M 49M sleep 0:35 0.00% orarootagent.bi
    Vmstat output:
    $vmstat 5 5
    kthr memory page disk faults cpu
    r b w swap free re mf pi po fr de sr s3 s3 s3 s3 in sy cs us sy id
    0 0 0 53698448 73900568 20 81 32 6 5 0 1 -0 0 1 -0 2235 1447 1984 1 0 99
    0 0 0 51196160 72037552 1 13 0 0 0 0 0 0 0 0 0 2505 1403 2204 0 0 100
    0 0 0 51193488 72035864 55 380 0 0 0 0 0 0 0 0 0 2487 2143 2203 0 1 99
    0 0 0 51183856 72030176 0 0 0 3 3 0 0 0 0 0 0 2496 1370 2182 0 0 99
    0 0 0 51182648 72029112 22 117 0 0 0 0 0 0 0 0 0 2503 1408 2193 1 0 99
    $cat /etc/release
    Solaris 10 10/09 s10s_u8wos_08a SPARC
    Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
    Use is subject to license terms.
    Assembled 16 September 2009
    I refered the metalink document id: [ID 761960.1]
    Database Instance Using Swap Space When There is Plenty of Free RAM metalink note [ID 761960.1]
    and tried the disabling the sga_max_size and memory_max_target and memory target with all different combination but no use.
    We have one more box where same setup was configured in solaris platform but there the above memory parameters are not disabled but it is not using swap space it takes memry only from physical RAM
    Can any one throw some lights on this issue. It wopuld be great if I come to know where the exact problem
    Thanks in advance
    With Regards,
    Boobathi P

    Hi,
    I didn't say I am not using 11gr2 memory parameters I am using all the automatic memory parameters but the thinks is as per the metalink note I tried by disabling the automatic memory parameters. but that didn't help me in preventing unnecessary swap usage. So I reverted. now it is using automatic memory parameters.
    so What is the solution for this?
    With Regards,
    Boo

  • How does swap in Linux work?

    I thought I knew, but I am not so sure anymore.
    I have 4GB ram and 2GB swap (I know it works because I even have hibernation), fast SATA HDD and Core 2 Duo.
    On occasions I run opera (~1GB), and two virtual machines. As soon as RAM utilization goes in the vicinity of 3.8GB, my system becomes totally unresponsive and to recover it, I try to close opera window, but the first challenge is to actually move a mouse, and the second to wait about a minute before the click takes any effect.
    I was thinking of putting swap on a USB flash drive to make things fast, but judging from this, it does not look like swap is being used at all.

    meph wrote:This is odd. I'm starting to doubt that it's caused by swapping itself. Just think about it, how does running out of memory present itself? It could hang, it could give you all sorts of error messages, but being unresponsive without any errors is weird. It means that the system is actually running but is being slowed down by something. Misbehaving process, whatever.
    I don't know. Windows behaves pretty much as my Arch when it runs out of memory.
    meph wrote:
    1) Try using swap file instead. Using it will mean that different physical location on your hdd will be used, and also that it will use your root partition, which is known to work well (i guess?). If it still misbehaves after you start using it, you will rule out faulty hdd (however unlikely that already is).
    2) Did you ever have this problem without using your VM's? Try and use all your memory without running those, and see what happens. For example opening a dvd image in a text editor could work? Just fill your memory with random garbage and see what happens, and while doing that you may want to watch htop again. This should rule out a problem in whatever virtualization software you're using.
    3) Try and turn swap off before trying to induce the problem. Again, this is about knowing how exactly will your system behave when it actually runs out of memory. Expected outcome is flooding you with error messages about killing processess, but the system should remain somewhat responsive. Cluttered and obviously not working well, but responsive. This step could help identify a memory defect, obviously the next step would be running a memtest.
    4) This one is rather obvious and I suppose you already did it, but look carefully into your log files, especially kernel.log. Or better yet, induce the problem, take a precise note about when exactly things started to go bad, and then look for errors in your logs around that time.
    1. That's quite a bother. I gonna have to do it a little bit later, if you think it is absolutely necessary.
    2. I opened two ISO files (2GB each) with geany, and the result was pretty much the same, except this time swap usage went up to 700MB, but that could be because htop managed to refres after 2-3 minutes, while previously it did not. But the system was freezing up pretty much the same way.
    3. Again, the result is similar. Maybe the system is a bit more responsive, especially in the first minute of running on full RAM, but afterwards everything else locks up, too. Still, the mouse is movable for most of the time, but it could be a coincidence.
    silentsnake,
    I usually have +20 tabs opened in my browser. I think opera is doing a fairly good job. Certainly better than firefox.
    The easiest solution would be to buy more RAM. RAM is very cheap - you can get 4x4 GB (16 GB total) for around 80 €.
    Yeah, I wish I was running DDR3. The cheapest 4GB SODIMM DDR2 module on ebay.co.uk is almost £60

  • [Solved] Swap Question

    I'm not really a n00bie, but no expert, either, and these are probably 'n00bie' Q's.
    Hardware: Asus A8V-MX mobo, Athlon64 XP 3500+, .5GB DDR 333, 250 GB WD Cavier (IDE), homebuilt.
    I realise I really need  1GB (at least) of real memory for the environment I run, but money is tight, and my mobo only has 2 DDR slots, so I'd have to buy a full 1 (or 2) GB and put my current memory in the closet.
    Arch (Don't Panic) is fully current (x86_64).
    I have 2 (relevant) partitions: /boot (40MB), and LVM  (16GB). both at the front of the drive.
    LVM: / (3.5GB, 78% in use); /home (.75GB; 36%), and swap.
    This build is about 2 months old. I boot to run level 3, and manually initiate X/KDE as needed, but I'm normally on the net; typically I'll have Thunderbird, a console session, and Firefox running most of the time. I'm bad about having a dozen (or more) Firefox tabs open (10 at the moment).
    I frequent DailyKos.com. DKos runs AJAX-enhanced Scoop, which either trashes Konqueror, or Konqueror trashes it - it doesn't crash, but rendering in that environment simply does not work - open a page at that site with 200+ comments attached. If Konqueror rendered large DKos pages properly, I'd be using it.
    DKos tends to have LARGE pages. I also have a large Yahoo 'home page' with 54 categories; I try not to leave Yahoo windows open, although the home page itself is almost always open. The nature of DailyKos is such that a lot of consecutive pages will be open, and left open, often for hours, constantly being updated by AJAX.
    I initially allocated .5GB to swap. System ran OK, but bogged down especially bad when I opened a lot of browser tabs. In that environment (according to free, watching the 'buffers/cache used' item, and the 'swap used' item), both real memory and swap would 'typically' be roughly 50% in use,
    I decided a few days ago to increase swap by 50% (to .75GB) to see the results. The system is running considerably smoother; it still gets bogged sometimes, but I realise with the hardware I'm running I can't expect miracles. Even with 3 or 4 DKos windows open, it's still quite quick.
    Increasing swap had what hit me as an odd effect. Again, I have 10 windows open (no DKos ATM, but the effect is normally the same with them, also). free shows about 60% of real memory in use, but only 5MB of swap is in use. Given equivalent environments, I would have expected swap usage to go UP if there was more available. It appears that real memory has gone up, slightly (~50% to ~60%), while swap usage has gone WAY done (~50% to < 5%; < 1% this moment).
    I'm an OLD ex-COBOL    programmer; I've done a few moderate-size (but not commercial, production-scale) projects in VB (pre-Linux) and understand the basics of OOPS, but I'm not a C/C++ programmer at all, and reading the source isn't terribly helpful. Why did swap usage decline so drastically? I'm certainly not complaining      - I'm simply confused,
    Does the kernel decide on a memory management scheme at boot, based on available real memory and swapspace? Why did increasing swap DECREASE swap usage, INCREASE (more subtly) real memory usage, resulting in better performance? Given the environment I'm running, is .75GB a rational/adequate swapspace size? Any suggestions on an optimal swap size? I realise I can experiment myself; I already have a bit, obviously, and and willing to do more experimenting (and will), but some direction as to what's happening behind the scenes would be helpful.
    Lastly, is 'free' (properly read) the most appropriate tool for monitoring this, or should I be looking at iostat, vmstat, something in /proc?
    TIA!
    Keith
    Last edited by grndrush (2008-02-22 19:07:38)

    I don't know the answer to all of your questions but I beleive this is how swap works, In order for the kernel to free up space on your Memory(ram), the kernel transfers data that is not currently being used to the Swap partition and when the data is needed again the kernel copies it back to your actual Memory. So Swap is only used when an application is in idle and no longer needs it's data to be directly in memory, then when that application is in use again the data is copied back to the Memory. The reason I beleive your swap usage is going down is because you're increasing the size, therefor the ratio's are not what they once were, you're still probably using the same amount of swap but since the size of the swap has been increased it doesn't seem like it. In a general rule a swap partition or swap file should be twice the size of the amount of actual memory you have, increasing your swap more than that really isn't going to make a change to how fast your system is since swap is only used when an application no longer needs it's data to be in ram because it's idle, so it's copied to swap until it's needed again. Hopefully this answers some of your questions, and for your last question I beleive it's a matter of opinion, each of those tools work equally well, I use 'top' myself.
    Last edited by twiistedkaos (2008-02-12 19:49:36)

  • Usage of sed question for experts

    I need a little help with sed.  Basically, I need to parse out selections from the output of hddtemp so conky can display some hdd temps for me.  I have hddtemp in daemon mode so A simple 'nc localhost 7634' displays the following:
    $ nc localhost 7634
    |/dev/sg1|ST3640323AS|31|C||/dev/sg2|ST3640323AS|31|C||/dev/sg3|WDC WD1001FALS-00J7B1|36|C||/dev/sg4|WDC WD7501AALS-00J7B0|32|C||/dev/sda|ST3640323AS|31|C||/dev/sdb|ST3640323AS|31|C||/dev/sdc|WDC WD1001FALS-00J7B1|36|C||/dev/sdd|WDC WD7501AALS-00J7B0|32|C|
    Just ignore /dev/sdd because it's going away soon. How can I use sed to extract the temps of /dev/sda and /dev/sdb and /dev/sdc so I can insert an appropriate line to my .conkyrc?
    I have can do this long hand using the '-cut -cx-y' command:
    sda:$color ${execi 300 nc localhost 7634 | cut -c50-51} C
    ...but I think a series of sed statements would be more power (one to delete everything up to the temp and one to delete everything after the temp) particularlly if the HDD gets swapped out which would change the number of characters in the line.
    Thoughts are welcomed and thanks!

    @Procyon - thank you for the code.  I added a dollar sign to before the brackets and it works great. 
    Screenshot and .conkyrc for anyone interested:
    # for this to work you need both lm-sensors and hddtemp
    # get both from main repos
    # set to yes if you want Conky to be forked in the background
    background no
    #cpu_avg_samples 2
    #net_avg_samples 2
    own_window yes
    own_window_type override
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    out_to_console no
    # X font when Xft is disabled, you can pick one with program xfontsel
    #font 7x12
    #font 6x10
    #font 7x13
    #font 8x13
    #font 7x12
    #font *mintsmild.se*
    #font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
    #font -artwiz-snap-normal-r-normal-*-*-100-*-*-p-*-iso8859-1
    # Use Xft?
    use_xft yes
    # Xft font when Xft is enabled
    xftfont Bitstream Vera Sans Mono:size=8
    #own_window_transparent no
    #own_window_colour hotpink
    # Text alpha when using Xft
    xftalpha 0.8
    on_bottom yes
    # Update interval in seconds
    update_interval 2
    # Create own window instead of using desktop (required in nautilus)
    #own_window no
    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes
    # Minimum size of text area
    #minimum_size 250 5
    maximum_width 258
    # Draw shades?
    draw_shades no
    # Draw outlines?
    draw_outline no
    # Draw borders around text
    draw_borders no
    # Stippled borders?
    stippled_borders 10
    # border margins
    border_margin 4
    # border width
    border_width 1
    # Default colors and also border colors
    default_color white
    default_shade_color white
    default_outline_color white
    # Text alignment, other possible values are commented
    #alignment top_left
    #minimum_size 10 10
    #alignment top_right
    alignment bottom_left
    #alignment bottom_right
    # Gap between borders of screen and text
    gap_x 12
    gap_y 37
    # Add spaces to keep things from moving about? This only affects certain objects.
    use_spacer no
    # Subtract file system buffers from used memory?
    no_buffers yes
    # set to yes if you want all text to be in uppercase
    uppercase no
    TEXT
    ${color #ddaa00}$nodename$color
    $sysname $kernel on $machine
    ${color lightgrey}Uptime:$color $uptime ${color lightgrey}- Load:$color $loadavg${color lightgrey}
    RAM Usage:$color $memperc% or $mem of $memmax${color lightgrey}
    Swap Usage:$color $swapperc%${color lightgrey}
    $color$stippled_hr${color lightgrey}
    Intel Xeon X3360 @ $color${freq_g} GHz${color lightgrey}
    Average CPU History:
    ${color black}${cpugraph 000000 5000a0}${color lightgrey}
    ${color lightgrey}Core0:$color ${execi 8 sensors | grep -A 1 'Core 0' | cut -c15-16 | sed '/^$/d'} C${color grey} @$color ${cpu cpu1}% ${alignr}${cpubar cpu1 6,120}
    ${color lightgrey}Core1:$color ${execi 8 sensors | grep -A 1 'Core 1' | cut -c15-16 | sed '/^$/d'} C${color grey} @$color ${cpu cpu2}% ${alignr}${cpubar cpu2 6,120}
    ${color lightgrey}Core2:$color ${execi 8 sensors | grep -A 1 'Core 2' | cut -c15-16 | sed '/^$/d'} C${color grey} @$color ${cpu cpu3}% ${alignr}${cpubar cpu3 6,120}
    ${color lightgrey}Core3:$color ${execi 8 sensors | grep -A 1 'Core 3' | cut -c15-16 | sed '/^$/d'} C${color grey} @$color ${cpu cpu4}% ${alignr}${cpubar cpu4 6,120}${color grey}
    $color$stippled_hr${color lightgrey}
    Thermal Monitors:${color lightgrey}
    ${color grey} GPU:$color ${execi 8 nvclock -T | grep 'GPU t' | cut -c21-22} C${color grey} MB:$color ${execi 8 sensors | grep temp3 | cut -c15-16} C
    ${color grey} sda:$color ${execi 300 nc localhost 7634 | sed 's/^|//;s/|$//;s/||/\n/g' | sed -n '/sda/{s/.dev.sd.//;s/|[^|]*|//;s/|.*//p}'} C ${color grey}sdb:$color ${execi 300 nc localhost 7634 | sed 's/^|//;s/|$//;s/||/\n/g' | sed -n '/sdb/{s/.dev.sd.//;s/|[^|]*|//;s/|.*//p}'} C${color grey} sdc:$color ${execi 300 nc localhost 7634 | sed 's/^|//;s/|$//;s/||/\n/g' | sed -n '/sdc/{s/.dev.sd.//;s/|[^|]*|//;s/|.*//p}'} C${color grey}
    $stippled_hr${color light grey}
    ${color lightgrey}Processes:$color $processes ${color grey}Running:$color $running_processes
    ${color}Name PID CPU% MEM%
    ${color #ddaa00} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
    ${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
    ${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
    ${color}Mem usage
    ${color #ddaa00} ${top_mem name 1} ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
    ${color lightgrey} ${top_mem name 2} ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
    ${color lightgrey} ${top_mem name 3} ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}
    Last edited by graysky (2009-04-09 18:34:48)

  • 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.

  • Solaris 10 SWAP limit?

    SCENARIO:
    installed solaris 10 on a IA32 system (pls see below for my computer specs), and during installation, i allocated 10GB for the swap slice.
    PROBLEM:
    when i do df -k and swap -s, these are the output (please see the swap part):
    df -k:
    Filesystem kbytes used avail capacity Mounted on
    /dev/dsk/c0d1s0 20172289 3434840 16535727 18% /
    /devices 0 0 0 0% /devices
    ctfs 0 0 0 0% /system/contract
    proc 0 0 0 0% /proc
    mnttab 0 0 0 0% /etc/mnttab
    swap 2834060 624 2833436 1% /etc/svc/volatile
    objfs 0 0 0 0% /system/object
    /dev/dsk/c0d1s6 15129027 2493637 12484100 17% /usr
    /usr/lib/libc/libc_hwcap1.so.1
    15129027 2493637 12484100 17% /lib/libc.so.1
    fd 0 0 0 0% /dev/fd
    /dev/dsk/c0d1s3 4300422 122107 4135311 3% /var
    swap 2833756 320 2833436 1% /tmp
    swap 2833460 24 2833436 1% /var/run
    /dev/dsk/c0d1s5 15129027 1423350 13554387 10% /opt
    /dev/dsk/c0d1s1 1986415 203200 1723623 11% /usr/openwin
    /dev/dsk/c0d1s7 10085764 293799 9691108 3% /export/home
    /export/home/gpwa/pwa
    10085764 293799 9691108 3% /home/pwa
    swap -s:
    total: 93376k bytes allocated + 13132k reserved = 106508k used, 2835464k available
    QUESTION:
    how come the swap allocated space is only approx 2.8GB ??? and not 10GB???
    is it because i am on a 32bit system? so there's a limit? but shouldn't the limit be around 4GB? and not just 2.8GB?
    if there's a limit, can i do something to exceed the limit? i mean, what happened to the remaining approx 7.2GB??
    pls enlighten me! thank you!!!
    COMPUTER SPECS:
    Pentium 4 - 1.4 GHz
    1GB RDRAM
    32 BIT system

    From "man swap"':
    USAGE:
    On the 32-bit operating system, only the first 2 Gbytes -1
    are used for swap devices greater than or equal to 2 Gbytes
    in size. On the 64-bit operating system, a block device
    larger than 2 Gbytes can be fully utilized for swap up to
    2**63 -1 bytes.
    Hence, a swap object might be larger than it appears..
    Btw, the reason to why your swap appears to be 2.8 GB is in size, is that in Solaris the available swap is calculated from the free swap + free memory, so in your case you have 2 Gb of swap and 0.8 Gb of free memory..
    7/M.

  • Temp and/vs swap

    Hi,
    I am still confusing about temp and swap usage in oracle even i read many articles /forums.
    Could any explain what is the difference between temp and swap?
    I understand ,Temp used whenever sorting,create index,select order by /distinct,group by,union,intersect occurs. Any thing Else?
    What is swap?At what circumstance oracle use SWAP space?WHY?
    How to find particular query using SWAP space?
    Thanks & Regards,
    VN
    Edited by: user3266490 on Mar 17, 2012 2:00 AM

    user3266490 wrote:
    Hi,
    I am still confusing about temp and swap usage in oracle even i read many articles /forums.
    Could any explain what is the difference between temp and swap?
    I understand ,Temp used whenever sorting,create index,select order by /distinct,group by,union,intersect occurs. Any thing Else?
    What is swap?At what circumstance oracle use SWAP space?WHY?
    How to find particular query using SWAP space?SWAP is OS activity.
    Oracle knows NOTHING about swap space.
    http://en.wikipedia.org/wiki/Swap_space

  • Get swap space on Solaris

    Hello
    there are different opinions on how to get the swap space on Solaris.
    some say: swap -s and the space= used + available
    others say swap -l (donno how they get the swap size)
    other say 'top' command
    others say using format command (in print sub-command)
    Could you please advise on how to get the swap size on a solaris machine?
    thanks

    mpfefer wrote:
    Hello
    there are different opinions on how to get the swap space on Solaris.That's because there is no single definition of 'swap'. So if you ask for 'swap space', it's going to be interpreted differently by different people.
    some say: swap -s and the space= used + availableThis shows you the allocation of the VM space. (Most uses of 'swap' by Solaris commands equate it with total virtual memory).
    others say swap -l (donno how they get the swap size)This shows you the allocation of all active swap files.
    other say 'top' commandThat can show you both RAM usage and VM/swap usage.
    others say using format command (in print sub-command)Format can show you disk partitioning information. Disk partitioning may or may not have any bearing on how you're using swap files. You'd need at least 'swap -l' information (and possibly other commands) to make comparisons. But then again, 'swap -l' is all you'd need in that case anyway.
    Could you please advise on how to get the swap size on a solaris machine?What do you mean by 'swap size'?
    Darren

  • Do we need SWAP Space?

    Hi Folks!
    I am running Archlinux 64bit on my System with 4096 Mb RAM. I use my System for Programming (Java, C), Gaming (UT2004, Enemy Territory, True Combat Elite, Doom3, ....), Distributed Computing (Boinc), Email, Surfing the Net, Watching and Converting Videos , Picture processing (Gimp) and Office work in general (Printing, Writing, ...).
    There was never a lack of memory on my System and my Swap Space, which have an amount of 2000 Mb, is never used.
    I would shrink it to 512 Mb, but i would not delete this partition.
    By the way: i do not use the hibernate Funktion. In that case i should give at least 4096 Mb to the Swap Partition.
    Here are some interesting Articles about that Problem:
    http://sourcefrog.net/weblog/software/l … /swap.html
    http://kerneltrap.org/node/3660
    http://www.linux.com/feature/121916
    What do you thing about this issue?
    Greetz
    roost

    iphitus wrote:In shining's case, something must have been forking off, possibly make starting new compilation processes.
    Actually, I just checked some old mails and here are some precisions :
    1) the first time, the box was totally unresponsive, and nothing visible had been killed
    2) the second time, it killed both firefox and gnome. I suspect I had the compilation running in screen, so that was still going on.
    And with firefox and gnome killed, the box was much more responsive
    Also I believe that I was using makeflags -j3 in both cases. So probably that does not help with memory usage.
    And it could also indeed makes the task of oom killer more difficult.
    So if I ever want to compile it again, I can do two things : running outside X to free a lot of mem, and with -j1
    Besides, I have only 1gb. So people with 2gb and more probably don't need to care about this.
    But I still think that it is better to have some swap space, and have the system slows down because of swap usage in extreme conditions, rather than having the oom killer kill tasks and losing potentially important data / work / whatever.
    Now if you know that the maximum memory usage you can achieve doing something productive is lower than your mem, then it is fine.
    Actually I have only 1gb and no swap, the only times I had problems is with this octave compilation, and I was not even using the box at this point, I just let it compile, so I did not lose anything.

Maybe you are looking for

  • GL balance is difference in two reports

    Hi, One GL balance is differece in two reports i.e in FBL3N & FAGLB03. Can anybody tell me the problem. govind.

  • Closing Screen=Sleep? help please

    Is there a way to disable the sleep function from occurring when closing the screen?

  • Horizontal scrollbar bug

    Anyone else noticed this bug? ... or is it just on my Safari. System Config: Macbook | Mac OS 10.6.8 | Safari 5.1.5 (6534.55.3) | Resolution 1920x1080

  • COPA Extraction

    Hi Friends, Im new2 BI7. 1)Plz provide detailed info on hw 2 go abt for COPA extraction. 2)I need 2 make Customer specific Datasources.So plz guide on this 3)Since my existing Copa reps r frm Report painter/Abap,they just drill down 2 multiple screen

  • Restore backup piece from tape to disk?

    Hi, Is it possible to restore rman backup piece from tape to disk? Please advice. Thanks,