OS X 10.5.6 Excessive use of swap disk

Discussion in 'macOS' started by wankey, Jan 20, 2009.

  1. wankey macrumors 6502a

    Joined:
    Aug 24, 2005
    #1
    This is beginning to annoy me... I have 4 gigs of ram in my computer, and it's using swap disk like there's no tomorrow.

    It's only using about 2.08 gigs of the ram (there is 1.92 free) and it's already used up 2.2gigs of 3.0gigs of swap disk space.

    This is highly annoying since I bought this ram for a reason. I am heavily using photoshop / illustrator at the moment, could that be causing the swap disk spikes?

    How do I disable the swap disk entirely? (I have it disabled in Windows... and I've never hit the 4gig ram limit even when I'm making a 10 feet x 5 feet poster in illustrator)
     
  2. lostngone macrumors demi-god

    lostngone

    Joined:
    Aug 11, 2003
    Location:
    Anchorage
    #2
    Can you post the output of top?

    Disabling VM would be a very bad idea.
     
  3. wankey thread starter macrumors 6502a

    Joined:
    Aug 24, 2005
    #3
    What do you mean output of top?
     
  4. rdowns macrumors Penryn

    rdowns

    Joined:
    Jul 11, 2003
    #4
    Launch Terminal.app, type in 'top' and post your results.
     
  5. Consultant macrumors G5

    Consultant

    Joined:
    Jun 27, 2007
    #5
    OSX VM Size usage does NOT matter unless all the free ram is used up. It's not windows.
     
  6. wankey thread starter macrumors 6502a

    Joined:
    Aug 24, 2005
    #6
    That doesn't fix anything... you've stated the obvious.

    I will try to give you the top when it happens again... but here is the top:

    Code:
    Processes:  87 total, 3 running, 7 stuck, 77 sleeping... 387 threads                                                                                       18:32:51
    Load Avg:  0.47,  0.41,  0.43    CPU usage:  9.01% user, 10.81% sys, 80.18% idle
    SharedLibs: num =   13, resident =   62M code, 2128K data, 4048K linkedit.
    MemRegions: num = 22967, resident =  751M +   25M private,  316M shared.
    PhysMem:  578M wired, 1558M active,  875M inactive, 3015M used, 1081M free.
    VM: 13G + 373M   11883835(134) pageins, 900005(0) pageouts
      PID COMMAND      %CPU   TIME   #TH #PRTS #MREGS RPRVT  RSHRD  RSIZE  VSIZE
      PID COMMAND      %CPU   TIME   #TH #PRTS #MREGS RPRVT  RSHRD  RSIZE  VSIZE
    32150 top          9.7%  0:09.95   1    18     30 1228K   188K  1820K    18M
    32141 bash         0.0%  0:00.02   1    14     20  264K   704K   936K    18M
    32140 login        0.0%  0:00.40   1    17     56  288K   268K  1100K    19M
    32139 mdworker     0.0%  0:00.14   3    50     32  636K  5928K  2344K    32M
    32119 Pages        0.0%  0:27.26  18   220    909   31M    37M    85M   567M 
    32117 mdworker     0.0%  0:00.44   4    55     56 1540K  4836K  4356K    33M 
    31457 MDCrashRep   0.0%  0:00.01   1    21     31  272K  2388K  1240K    28M
    31334 AppleMobil   0.0%  0:00.10   1    42     32  816K  2388K  2768K    28M
    31076 rcd          0.0%  0:00.39   2    63    217 1964K  8080K  5188K   344M
    30932 Safari       2.9% 29:07.71  14   314-  3565  282M    46M   370M-  897M 
    30415 Adium        0.0%  1:34.86  12   235    919   31M    29M    42M   503M
    30217 iChatAgent   0.0%  0:00.73   3    77    166 1460K  4876K  2484K   290M
    30079 iTunes       0.0%  3:37.00  15   299    961   29M    20M    44M   444M
    29934 ntfs-3g_da   0.0%  0:00.00   1     8     20   48K   184K    80K    18M
    29579 Unsanity U   0.0%  0:00.23   1    56     38  460K  7292K  1644K   292M
    29377 iCal         0.0%  0:04.47   5   116    530   12M    20M    19M   391M
    28260 Mail         0.0%  1:12.68  19   351    811   33M    36M    53M   500M 
    24311 bash         0.0%  0:00.11   1    14     20   32K   704K   400K    18M
    24310 login        0.0%  0:00.72   1    17     57   20K   268K   424K    19M
    24309 Terminal     3.4%  0:08.34   6   119+   437 3556K    16M  9316K+  381M
    23593 smbd         0.0%  0:00.00   1     8     59     0  1912K   148K    23M
    23592 smbd         0.0%  0:00.65   1    17     58  160K  1912K  1500K    23M
    17162 DashboardC   0.1%  3:49.27   7   124    312 8468K    11M  9600K   365M
    17161 DashboardC   0.0%  0:36.28   5   157    314 8480K    11M    12M   360M 
    17160 DashboardC   0.0%  1:06.29   7   161    729   22M    15M    34M   406M 
    16808 Dock         1.3%  4:28.88   4   226    616 5352K    34M    12M   447M 
    12158 ssh-agent    0.0%  0:00.04   1    23     33  284K   204K   544K    19M
    11642 nmbd         0.0%  0:04.14   1    14     35  180K   220K   784K    19M 
     9775 DiskImages   0.0%  0:25.63   3   107    325  440K    12M  2888K   363M 
    
     
  7. lostngone macrumors demi-god

    lostngone

    Joined:
    Aug 11, 2003
    Location:
    Anchorage
    #7
    As in the earlier post, you want to be in Terminal.app

    You can find it in the Utilities folder inside the Application folder.
     
  8. sidewinder macrumors 68020

    sidewinder

    Joined:
    Dec 10, 2008
    Location:
    Northern California
    #8
    wankey,

    What makes you think the swap is being used? Are your drives thrashing? What does the " Activity Monitor" show when selecting "System Memory".

    S-
     
  9. lostngone macrumors demi-god

    lostngone

    Joined:
    Aug 11, 2003
    Location:
    Anchorage
    #9
    He is using swap if you look at his page in and page outs.
     
  10. lostngone macrumors demi-god

    lostngone

    Joined:
    Aug 11, 2003
    Location:
    Anchorage
    #10
    I would recommend a reboot and then run "top -u" and just watch and see what are you doing when you see a lot of pagouts and see if you still have a large amount of free memory.

    From what you have said it sounds like you are seeing this, but this is not normal the system should not normally do this if it still has a lot of free memory.

    Also just because the system show a little "free" memory doesn't necessarily mean the Machine needs more ram, you need to look at the "active", "inactive", "used" and the page status together. If the Machine has been running for a long time it may show little "free" memory but this in actuality can be a good thing. as long as you don't see a lot of paging.
     
  11. wankey thread starter macrumors 6502a

    Joined:
    Aug 24, 2005
    #11
    The system is thrashing the harddrive continuously. Page ins is 11.9 mil, page outs is nearlly 1mil...

    Ram is barely half full and at most (at the height of my workflow) it hit around 80% with photoshop and illustrator working
     
  12. lostngone macrumors demi-god

    lostngone

    Joined:
    Aug 11, 2003
    Location:
    Anchorage
    #12
    I don't know... We need a Photoshop expert to explain how it handles memory.
    It may have to do with it being a Carbon based app.
     
  13. DoFoT9 macrumors P6

    DoFoT9

    Joined:
    Jun 11, 2007
    Location:
    Singapore
    #13
    hhmm my guess is that PS uses the in/outs even if there is free memory. there would be a whole bunch of background processes from photoshop that you cant see so maybe they are using it all up?

    what other applications are you running?
     
  14. sidewinder macrumors 68020

    sidewinder

    Joined:
    Dec 10, 2008
    Location:
    Northern California
    #14
    Sorry....some how I managed to miss the post with the top results.

    S-
     
  15. wankey thread starter macrumors 6502a

    Joined:
    Aug 24, 2005
    #15
    I was running photoshop but not doing anyhting in it, I was mainly using a heavy Illustrator art board (a 10x5 foot poster with massive amounts of layers) that I thought was hugely slowing things down but the ram was still barely scratching 2/3 full.

    The other programs include:

    Mail
    iTunes
    iCal
    Adium
    Console
    Pages
    Skitch (background)
    smcFanControl

    All of which the ram usage was under 60% of the 4.0gigs in my computer.
     
  16. DoFoT9 macrumors P6

    DoFoT9

    Joined:
    Jun 11, 2007
    Location:
    Singapore
    #16
    well that would be the thing then, the layers!!

    using 13GB of VM, that seems pretty darn light. i use that much when im just browsing the internet...how much free HD space do you have?
     
  17. wankey thread starter macrumors 6502a

    Joined:
    Aug 24, 2005
    #17
    I have about 80gigs of free space.
     
  18. DoFoT9 macrumors P6

    DoFoT9

    Joined:
    Jun 11, 2007
    Location:
    Singapore
    #18
    oh and dont forget RAM usage for PS is limited to 3GB of RAM :(

    a fix can be found here (i think its a fix anyway)
    FIX?
     
  19. wankey thread starter macrumors 6502a

    Joined:
    Aug 24, 2005
    #19
    Oooooh thanks

    Actually that no longer helps, I have read the post and some later posts say it is no longer useful to create a ram disk.
     
  20. Matek macrumors 6502a

    Joined:
    Jun 6, 2007
    #20
    Virtual memory isn't as simple as some of you would like to believe, so I'll give you an example.

    Let's say you run out of ram. The least needed program you're currently using needs to have its memory contents moved to the hard drive to make room for the software you're trying to run. If the old program is using about 500 megabytes of memory and your hard drive is capable of writing 50 MB/s, you're machine would have to stop completely for 10 seconds before you could continue to run your new program.

    Because we don't want that to happen, virtual memory is often pre-filled with the contents of your main memory, which means you can immediately wipe some of your RAM to make space, because a copy is already present on the hard drive. Of course, many different factors affect this behaviour, the copy isn't always up to date, it's only done periodically so your hard drive doesn't need to work constantly, but it should give you an idea of what's happening in the background.

    Don't expect your page file to be zero bytes, just because you still have some memory left.
     
  21. ihabime macrumors 6502

    Joined:
    Jan 12, 2005
    #21
    Not a photoshop expert, but I do know that PS has it's own settings for memory and scratch disk in its preferences. One thing that helps a lot is to set the PS scratch disk to a different physical disk than your OS install, that way the writes to scratch won't interfere with normal OS caching.
     

Share This Page