Is it worth using "purge" in MacOS X?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Dave2002
    Full Member
    • Dec 2010
    • 17842

    Is it worth using "purge" in MacOS X?

    "purge" is sometimes a useful command to use in MacOS X It runs from a Terminal window.

    It is (arguably) usefiul if memory runs short, and things run slow, though perhaps MacOS will eventually sort things out without intervention.

    I wondered if it's worth running a script somewhat like the following, to keep things flowing:

    #!/bin/bash
    COUNTER=20
    until [ $COUNTER -lt 1 ]; do
    echo COUNTER $COUNTER
    purge
    sleep 300
    let COUNTER-=1
    done

    I have tested a variant of that - but can't say that it really makes a lot of difference so far. It waits 5 minutes between each issuing of the purge command. It will repeat this 19 times (I think) so will run for about one hour and 35 minutes.
  • Lento
    Full Member
    • Jan 2014
    • 646

    #2
    Has anyone discovered if a "non-clean" reinstall of OSX makes much speed difference, btw? No experience of purge, I'm afraid.

    Comment

    • Dave2002
      Full Member
      • Dec 2010
      • 17842

      #3
      Originally posted by Lento View Post
      Has anyone discovered if a "non-clean" reinstall of OSX makes much speed difference, btw? No experience of purge, I'm afraid.
      Interesting question, but I don't have the time (hours) to test that out. As I recall it takes between 45 mins and 1:30 to do that, depending on various factors. What I can say is that if the spare disc space on your machine gets squeezed, then things do seem to get slower. Not everyone runs "at the margins" but I'm afraid I have experience ot that - all too often. So it's worth using Spotlight to find large (very large) files you may not want/need, and delete them. Note, it's hardly worth the bother for small files.

      If you have loads of spare space - do CMD -I over the disc icon, then your machine should run near full speed.

      The other thing it's worth doing is checking the available memory with Activity Monitor. If there's not much spare, then delete processes until there's more spare. If you're the sort of person who has 5 or more applications open, plus several browsers each loaded up with 4 or more tabs, then you might get into this situation quite often. Immediate solution is to close some down, but if it happens a lot then try a memory upgrade - if that's possible. See the Crucial website - http://uk.crucial.com/gbr/en - which has a tool which tells you which chips you need for your particular machine(s). Unfortunately Apple made it a lot harder to upgrade some machines, for examply by gluing or soldering chips/modules in. Some are relatively easy to upgrade as modules "simply" ** pull out/push in.

      **Note: sometimes brute force and contact lubricant or cleaner is needed to get modules in/out. There are websites which will tell you, based on the serial number, whether your machines have a plug in upgrade possibility. Others may either not be upgradeable, or only upgradeable by a specialist agent.

      Comment

      • MrGongGong
        Full Member
        • Nov 2010
        • 18357

        #4
        I have found these folks to be useful with regard to memory etc

        Expert microsoldering repair work on electronic equipment and components. Solder Fix offers component level repair on a wide range of computer and electronic equipment.

        Comment

        • Dave2002
          Full Member
          • Dec 2010
          • 17842

          #5
          Originally posted by Dave2002 View Post
          "purge" is sometimes a useful command to use in MacOS X It runs from a Terminal window.

          It is (arguably) usefiul if memory runs short, and things run slow, though perhaps MacOS will eventually sort things out without intervention.

          I wondered if it's worth running a script somewhat like the following, to keep things flowing:

          #!/bin/bash
          COUNTER=20
          until [ $COUNTER -lt 1 ]; do
          echo COUNTER $COUNTER
          purge
          sleep 300
          let COUNTER-=1
          done

          I have tested a variant of that - but can't say that it really makes a lot of difference so far. It waits 5 minutes between each issuing of the purge command. It will repeat this 19 times (I think) so will run for about one hour and 35 minutes.
          Seems to work and keeps the memory allocations down, but will cause periodic glitches (short) in music being played. Don't try this if music playback is your highest priority.

          Comment

          • Stunsworth
            Full Member
            • Nov 2010
            • 1553

            #6
            There are free utilities in the App Store to do this. I use one called MemoryFreer. It sits in the top right of screen and shows how the memory is being used. A click on the icon allows the memory cache to be flushed.
            Steve

            Comment

            • Dave2002
              Full Member
              • Dec 2010
              • 17842

              #7
              Originally posted by Stunsworth View Post
              There are free utilities in the App Store to do this. I use one called MemoryFreer. It sits in the top right of screen and shows how the memory is being used. A click on the icon allows the memory cache to be flushed.
              Indeed - but I wanted something which would just do it without being clicked for long sessions.

              Comment

              • Anastasius
                Full Member
                • Mar 2015
                • 1806

                #8
                The jury seems to be out on the use of 'purge' particularly as it will depend on what version of OSX you are running. Mavericks and onwards uses some very clever techniques to squeeze the very best out of what memory one has available. http://osxdaily.com/2013/11/14/use-p...s-x-mavericks/

                Indeed, in Mavericks the Memory Pressure graph is the only thing that you need to worry about. I noticed that mine had gone amber which also, not surprisingly, corresponded with the iMac slowing down badly. A restart restored the Memory Pressure graph back into the green but I did notice that it started to creep up a little each day.

                I also couldn't make head nor tail of the figures of memory usage in comparison to adding up the amount of memory used by each process as shown in Activity Monitor. Seemed to be adrift by several GB and so I asked the question on one of the Apple forums and the results were quite enlightening. For starters, run Etrecheck from Etresoft.com. It comprehensively tells you what old legacy stuff is still being loaded even though you thought you'd deleted the program. So you can go in and delete those rogue Startup Items and Launch Daemons that are cluttering up your system.

                It tells you accurately just how much memory is in use in simple terms.

                Chrome was a real memory hog and so I've ditched it. I used to have it open at the same time as Safari.

                I've also uninstalled Sophos because as far as I can see most of the time all it is doing is scanning my emails for Windows viruses.

                And now my Memory Pressure is a very thin green bar that is not increasing as it used to (memory leak maybe from some of those leftovers?) and the iMac is running very quickly.

                So for me there is no need to purge - which will slow things down until you've filled up the caches again.
                Fewer Smart things. More smart people.

                Comment

                • Dave2002
                  Full Member
                  • Dec 2010
                  • 17842

                  #9
                  Originally posted by Anastasius View Post
                  The jury seems to be out on the use of 'purge' particularly as it will depend on what version of OSX you are running. Mavericks and onwards uses some very clever techniques to squeeze the very best out of what memory one has available. http://osxdaily.com/2013/11/14/use-p...s-x-mavericks/

                  Indeed, in Mavericks the Memory Pressure graph is the only thing that you need to worry about. I noticed that mine had gone amber which also, not surprisingly, corresponded with the iMac slowing down badly. A restart restored the Memory Pressure graph back into the green but I did notice that it started to creep up a little each day.
                  You could be right, though I haven't updated past Mountain Lion yet. I probably should, though I have one machine which I'm keeping on Snow Leopard for the moment. Having to use sudo could be a pain for the use of a script file to get round the new systems.
                  I also couldn't make head nor tail of the figures of memory usage in comparison to adding up the amount of memory used by each process as shown in Activity Monitor. Seemed to be adrift by several GB and so I asked the question on one of the Apple forums and the results were quite enlightening. For starters, run Etrecheck from Etresoft.com. It comprehensively tells you what old legacy stuff is still being loaded even though you thought you'd deleted the program. So you can go in and delete those rogue Startup Items and Launch Daemons that are cluttering up your system.

                  It tells you accurately just how much memory is in use in simple terms.
                  If EtreCheck really does detect rogue programs it'll be useful. I'm still convinced that I've got a rogue version of Spotify. I've told it not to start up, but it often does.

                  Chrome was a real memory hog and so I've ditched it. I used to have it open at the same time as Safari.
                  Interesting about Chrome.

                  I've also uninstalled Sophos because as far as I can see most of the time all it is doing is scanning my emails for Windows viruses.
                  So now you happily pass on Windows and other viruses nonchalantly!

                  And now my Memory Pressure is a very thin green bar that is not increasing as it used to (memory leak maybe from some of those leftovers?) and the iMac is running very quickly.

                  So for me there is no need to purge - which will slow things down until you've filled up the caches again.
                  I'm now seriously wondering if I can have/should have some much more powerful and faster machines. Sadly that will cost ££££s (just checked the number of £s - where the first one is 2 or more). Can I/could I justify that? I suppose I should try other things first, such as a memory upgrade on some of the machines, though I don't think that'll give the boost needed for really intensive applications.
                  Last edited by Dave2002; 24-10-15, 17:02.

                  Comment

                  • Anastasius
                    Full Member
                    • Mar 2015
                    • 1806

                    #10
                    Etrecheck will show up if you've got anything 'extra' re Spotify.

                    Re Sophos...given that in the last three years it has flagged up precisely one and that that was in an obvious scam email, I think the risk to the digital world at large is miniscule.
                    Fewer Smart things. More smart people.

                    Comment

                    Working...
                    X